Open machawk1 opened 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.
@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
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...
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.
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.
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.