machawk1 / warcreate

Chrome extension to "Create WARC files from any webpage"
https://warcreate.com
MIT License
206 stars 13 forks source link

Allow a user to specify the location (Save As...) of where the files are downloaded #76

Open machawk1 opened 8 years ago

machawk1 commented 8 years ago

Also, per @phonedude, create a sub-folder (e.g., WARCreate WARCs dir) where all WARCs are saved instead of having them placed into the default Downloads folder, which has many other files on users' systems.

peterwebster commented 8 years ago

Hi @machawk1 : I'm very pleased to learn about this application. I'm not sure how actively you're working on it - but FWIW, I would suggest making this enhancement a priority.

machawk1 commented 8 years ago

@peterwebster It is a priority. I am currently reliant on the FileSaver ( https://github.com/eligrey/FileSaver.js/ ) library, as it was the most elegant means to even save a file programmatically when WARCreate was first released (~2012). There may be a way to invoke the "Save File As..." dialog, which is what is needed to meet this ticket's requirements.

Thanks for the ping. /cc @weiglemc @phonedude

machawk1 commented 8 years ago

There might be hope in using the Chrome FileSystem API to invoke the SaveAs functionality. The API docs indicate that its usage is more focused on Chrome apps than extensions but it could work. Stand by...

machawk1 commented 8 years ago

When adding fileSystem to the extension's permissions, this unfortunate error occurs: 'fileSystem' is only allowed for packaged apps, but this is a extension. Back to the drawing board.

machawk1 commented 8 years ago

chrome.downloads API looks more promising for the extension though we will need to account that the data to be saved is in a Blob and not at a URI.