Can chrome extension have its own IndexedDB? - google-chrome

Scenario: When user clicks the extension icon, a pdf file is generated for that URL tab.
I know one can store this pdf file in IndexDB of that particular origin i.e, URL.
When user visits 10 URLs and click 10 times my extension icon, 10 files will be generated.
Can my extension store these 10 pdfs in its own IndexDB? not in the IndexDB of URL origin.

Related

Is there a way to redirect traffic from file extension

I currently have the piece of code that allows you to go to one of the pages on my site without having to type in the file extension in the url. I am wondering if there is a way to redirect all traffic from users using the file extension in the link, to the link without a file extension. For example, if a user types example.com/about.html I want it to redirect it to example.com/about.

Chromebook photo access

I'm looking for a way to access the files in "Downloads" on a Chromebook.
Currently, when a user takes a picture with the Camera app on Chrome OS, it stores a photo in the app. In that list of photos, you can choose to save the file to disk. Because the Chrome OS local storage options are limited, it seems like the options are to Google Drive or the local Downloads folder.
I'd like to be able to able to access these files through a developed extension (or other means if appropriate).
I found https://developer.chrome.com/extensions/downloads, but it doesn't list random photos placed in the downloads folder since they were initiated from the browser.
Any ideas?

Sharing files present in google drive with a web app

Is it possible for a user to share a file directly with a web app.
This is what I am envisioning. User A sends a request to userB to upload a document. User B logs in to our site and either uploads a document directly,
or
clicks on a link that lets him share files already in google drive.
The only requirement is that userB is someone able to share files in his drive with the webapp , and userA gets the notification through the App.
Also userA can access the file through his dashboard in the web app.
I am using ruby on rails specifically , but I couldn't find any gem that lets users share files present in drive.
I found this link.
https://developers.google.com/drive/v3/web/share-button
But am not sure if this is what I want. I want to create a share button upon clicking user can select a file in his google drive and share with the web app , and then user A can click on it and open it in google drive.

Download files/videos from url and write them to disk without prompting save location dialoge using chrome app

I am writing a chrome app which needs to download videos from urls in background after specific time intervals.
Unlike chrome extension ( which has chrome.downloads api to deal with downloads ) chrome.downloads in not available for chrome apps.
If I use filesystem api, it shows the save location dialogue which I do not want. As, I need downloads to be dealt in the backgorund.
Is there any work around for this requirement ?

How to view Google Drive file in browser

There is file stored in Google Drive. It is needed to open this file in browser. Google API JS library has method gapi.client.drive.files.get. It allows to get file resource which contains downloadUrl. This url allows to download file and save it on disk. Query string of url contains parameter e=download. If value of this parameter is changed to 'view' (e=view) then this url can be used in order to open gif file in browser. Nevertheles if the same is made with url to txt file then file is downloaded anyway.
Is there Goggle url which can be used to open txt file in browser? How to get such url?
Use the webContentLink:
"A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials."