firefox addon - Add-on for Submitting File from Clipboard -


is there browser-add-on can create temporary txt file clipboard , populate file submit dialog?

guide firefox:

get data clipboard this: paste data clipboard using document.execcommand("paste"); within firefox extension

now can either create temporary file os.file: https://developer.mozilla.org/en-us/docs/javascript_os.file/os.file_for_the_main_thread

or create object window.createobjecturl.

then assuming file submit dialog prompted html5 uploader, should set value of html5 dialog box there other ways though too, mozsetdataat, mozsetfilearray etc, search github these keywords shows excellent examples:

you might need use mimetype of application/x-moz-file not sure. experiement , share solution, , ask along way. fun stuff.

there other smarter ways attach input type=file, trying other week. interested if else share solutions trick file input element think native file dialog used, maybe using xpcom.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -