Would need help to export files from database collection! Files as image, docx, pdf, etc.
The purpose is to migrate/duplicate the database to other database elsewhere, say Google Drive or other cloud based SQL database.
Currently there’s no FTP support nor easy to export files, but only field values. The path of the data field once exported also render useless if export collection to .csv file in Wix dashboard, because it shows path in this format, "wix: document://v1/535f77_4ee652445840ba831d5431becca9fb.docx/Resume.docx" and " image://v1/535f77_c323cf5e8e2644fa3103c3b56ab2c7~mv2.jpg/320_320/535f77_c3cf5e8e26444fba3103c3b56a2c7~mv2.jpg" , which cannot be downloaded directly.
So I’m assuming this need to be done in the code level. However, which function will able to perform the operation like take the path and upload the files via Google Drive API or other cloud database API?
Also the best will able to keep the database structure, because I would to migrate the files and keep other fields matched. In this case, that data contain names, resumes, profile pictures, email, etc. So the data need to be keep organized and aligned during and after data migration.
If you are going to perform this one time only I would just export the Data Collection as a CSV file and then replace the wix:document:// stuff with https://docs.wixstatic.com/535f77_4ee652445840ba831d5431becca9fb.docx.
You can also make this using code of course but it is not necessary for one time efforts.
I tried to do the format you described, but get the result 404 not found.
Do you mean replace the domain “wix:document://v1/{fileId}.docx/{fileName}.docx” with “https://{domain}/{fileId}.docx”?
I tried “https:// docs .wixstatic.com/{fileId}.docx” but also 404 not found.
Oh, I get it, it’s because missing one more component " https://docs.wixstatic.com/{system-generated-id}/{fileId}.docx ". I found this {system-generated-id} by copying the download button url and in this case, it’s “ugd” and it’s different for different databases.
@jerry-wu , did you manage to find the exact code necessary to download the necessary media files? I have a similar requirement for video files… and I’m guessing the prefix would be video.wix.static.com… but its gives me the following error message
Error> AccessDenied
Access denied.
Anonymous caller does not have storage.objects.get access to video.wixstatic.com/v1/eacf41_b03164d5817c43e6ba07b25c9fe1edf9/1st Video.mp4.
Did you try this directly over a browser… or wrote a code on Wix Editor? All I’m trying to do is download copies of all the files that are referenced in the wix database (exported via csv)