Can someone please break this down in a way that can be followed clearly? I read through the links, and the information is all over the place. For example:
I can upload just fine using the button.uploadfiles(). The issue is that I’d like to be able to create a folder and then upload the images to that folder. I do not see a way to do this using the button’s exposed methods. This current post appears to have a solution but is difficult to follow. For example, I copied and pasted the code above as a starting point, and I got an error with the first line.
import { mediaManager } from ‘wix-media-backend’ ;
Cannot find module ‘wix-media-backend’ or its corresponding type declarations.
I have a general understanding of how the Wix back-end works but seeing the process in the context of finding a solution to this specific problem will go along way.
I’m requesting the specific steps to accomplish the exact task of uploading to a specified folder and returning the Wix URL… All using Wix code.
For example
-
What needs to be done to get access to wix-media-backend?
-
What is the buffer-source / buffer-data and how do you get it?
-
How do you create and HTML-Component-File-Selector in WIX?
-
How do you use it to get all needed info, including base-64-code?
-
How do you send all the gathered data to your site?
-
How do you use the provided code from Wix-API on back-end(send DATA to backend)
-
How do you handle the data on the backend
-
What is the code I’d use for the button click method?
A lot of people would benefit from a straightforward, easy-to-follow solution. If anyone got this to work, please highlight your steps.
Thank you in advance.