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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...