I’m trying to make a page where the user can upload a file to a database using code, the reason I’m not just doing this with a dataset is because I need it to save certain fields with different information based on other user input.
So I tried the code below, but “fileUrl” doesn’t return the actual url of the file, it returns the type, name and size of the file, so how do I get the actual file url?
Here is the code I used:
`
function uploadFileType1() {
what does console.log(fileUrl) prints? I expect something like wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg#originWidth=1970&originHeight=1120
be sure that in your collection1 the content field is created with type image.
Thanks Ribbon tor your respons,
I do indeed get this as the URL, but when i insert an item with that URL as the content field the actual field remains empty, and the field is set approprietly for the file type.