Use /ipfs/uploadFolder to upload File from client

Hello
i am using this function to upload a folder full of json data as specified like this :
[ {
path: ’ path needed here ',
content: ’ base64 string etc. ’
} ]

my question here is : when i allow the user to upload an image with my client e.g i have an input of type β€˜file’ which allows a user to add an image or a folder to this field, then i don’t have the path to that object, for security reasons, i can turn the file into a base64 string but i can’t specify the exact path.
what shell i do in this case? any advice on how it can be done?

you could use simple IPFS functionality to upload a file, you can do it now from cloud code too: https://docs.moralis.io/moralis-server/cloud-code/cloud-functions#ipfs

1 Like

Thanks for that, solves my problem.