I searched the forums but all I could find were these unanswered questions: https://www.wix.com/corvid/forum/community-discussion/upload-file-to-external-file-storage & https://www.wix.com/corvid/forum/community-discussion/can-w-uploadbutton1-value-be-converted-to-blob
The only way I can find to upload a file with Wix is to use the 'Upload Button', but this uploads the file to the site's storage. I need to send the file to an external endpoint and I cannot store the file on Wix because it needs to be visible only to that user due to privacy policy.
I've tried creating a hidden file input but 'document' is undefined; we're forced to use Wix's `$w(..)` api. Is there any way around uploading the file to Wix?
HTML element is a IFrame element. Drag and drop from "+" => Embed => widget or site. Create a HTML/SCRIPTED code and insert on that element. Use onmessage/postmessage for exchange data to.
That element is a Vanilla web component and you have Window, Document global classes.
The post is an example how to use upload on backend. Upload to external (fetch) instead wix-media.
That uses Buffer module and Base64. Depending on the external storage you will need upload on base64 and/or to control the chunks (group of bytes).
Backend has a limit about 10MB. Use HTML Element instead.
https://www.wix.com/corvid/forum/community-discussion/upload-wix-media-backend-filecontent/ and REST API to external storage. Use FETCH or XMLHTTPREQUEST Or HTML Element with <INPUT> + FETCH or XMLHTTPREQUEST