I am building map based application when clicking on the map no image of that place is uploaded by default
User can upload images of the place he/she clicked on the map the the image user uploaded on the map gets uploaded via storage.createFile(bucketid,placeid,selectedImage)
so what i am doing currently to make this idea possible
with the help of bucketid and **place(id) place is the fileid for appwrite ** going to that location using storage.getFilePreview(bucketid,placeid) and getting the image in response.href
but the response.href is a link for which image wasn't uploaded first
response.href works only after user uploads image of that place till then before the image has not got uploaded how do I check whether the image is uploaded or not to set the state of my variable in reactjs
sorry if post sounds confusing but i need help what should i usestorage.FilePreview() is this correct ?
That might throw an error if the file doesn't exist
You might need to call get file to see if the file exists and then default to some placeholder if it doesn't
Recommended threads
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...