Hi,
I want to send uploaded file by user to 3rd part rest API. I printed on console URL which was given to file. it was
wix:document://v1/d9f586_a0af9b5a86084b458d3eb1cb5b5a22ff.xlsx/מבחן_שלי.xlsx
In order to make it general URL, I replaced wix:document://v1/ to string https://static.wixstatic.com/ugd and removed /מבחן_שלי.xlsx
Could you please confirm that I can use such functionality, and prefix https://static.wixstatic.com/ugd will not be changed to something else?
Or, on the other side please suggest what is the right way to check out URL of uploaded file.
thanks,
Ella
There’s no guarantee this prefix will remain this way. It has changed in the past.
We’re working on an api that will allow you to get an uploaded file “external” url.
So the answer would appear to be no. You can use mediaManager.getFileURL(), though the documentation doesn’t exactly tell you that; it says you have to use it in conjunction with the return values of other mediaManager functions, but you don’t - there are other sources of these URLs, not least File/Document collection types.
Now I’d like to know why getFileInfo() returns parentFolderId. Is there actually any way to use that? I’d love to be able to determine programatically where in our dumpster fire of a directory structure a file resides, but how to achieve this was not obvious after a cursory reading of the documentation. In fact I couldn’t see any use for this value at all.