can user upload a file to chrome extension?

815 views
Skip to first unread message

suha

unread,
Sep 20, 2018, 6:34:38 AM9/20/18
to Chromium-Extensions-Announce
Hi All,
I am Trying upload a file to the chrome extension.Is it possible to upload a file to extension.Please let me know is possible.

Thanks and Regards
Suha

PhistucK

unread,
Sep 20, 2018, 9:03:56 AM9/20/18
to suhashinis...@gmail.com, Chromium-extensions
You can use <input type=file> and get the file using inputElement.files[0]. Then, store it using IndexedDB or something like that.

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/88dfd25e-9cf2-4aed-875e-3b5f29c4b45c%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Swapnil Jagtap

unread,
Jul 1, 2021, 2:16:00 PM7/1/21
to Chromium Extensions, PhistucK, Chromium-extensions, suhashinis...@gmail.com
@PhistucK, I dont think it works! As after opening the file selection window, the extension popup looses focus and is closed. Do you have any solution for this?

PhistucK

unread,
Jul 1, 2021, 2:58:03 PM7/1/21
to Swapnil Jagtap, Chromium Extensions, suhashinis...@gmail.com
Oh, from the popup... That was not mentioned in the original message.
It sounds like potentially a bug (though I am guessing it is a known issue), you can file it at crbug.com, maybe someone will fix it (search for an existing issue first, though).

PhistucK

Jackie Han

unread,
Jul 1, 2021, 4:03:09 PM7/1/21
to PhistucK, Swapnil Jagtap, Chromium Extensions, suhashinis...@gmail.com
Generally, <input type=file> can work in the popup page. Choose a file, and the popup won't close.
But a user told me it will close the popup on a chromium-based browser, but I didn't reproduce it on my device.

You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

Kent Brewster

unread,
Jul 1, 2021, 4:14:28 PM7/1/21
to Jackie Han, PhistucK, Swapnil Jagtap, Chromium Extensions, suhashinis...@gmail.com

Swapnil Jagtap

unread,
Jul 2, 2021, 1:39:38 AM7/2/21
to Kent Brewster, Jackie Han, PhistucK, Chromium Extensions, suhashinis...@gmail.com
Thank you all for responding,
I got this open issue from chromium bugs https://bugs.chromium.org/p/chromium/issues/detail?id=1158230.
It is a major issue for many chrome extensions, So I guess we should wait until it's fixed or else also try some other ways like drag and drop!

regards,
Swapnil 
Reply all
Reply to author
Forward
0 new messages