I want to get upload file url, when file create successfully. How I can achieve that?
Appwrite storage doesn't create URL for given file.
https://appwrite.io/docs/client/storage?sdk=flutter-default#storageGetFilePreview
When you use the createFile method you'll get back the file ID, use it in getFilePreview method.
In the console when I go to file detail, I can see the FileUrl button, I'm surprise why I want to call another api getFilePreview.
Click on the button You'll get the file preview URL. If you want to just have URL you can use this https://appwrite.io/docs/rest#no-headers
https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID]
Replace
- [BUCKET_ID]
- [FILE_ID]
- [PROJECT_ID] And
- cloud.appwrite.io if you're not using the cloud.
Okay, got it your point.
<:appwriteupvote:899677724615016528>
Hey, if this issue has been solved, kindly edit the post title as solved. Thank you
[Solved]Get Uploaded File URL
[SOLVED] Get Uploaded File URL
Recommended threads
- 500 Internal Error when Project is opene...
After migrating from 1.6.1 to 1.7.4 I noticed this strange behaviour: When I open a project in a separate tab I get a 500 internal error. However, then I simpl...
- WEBP preview not working after upgrading...
Only with preview, I'm getting this error: {"message":"no decode delegate for this image format `WEBP' @ error\/blob.c\/BlobToImage\/481","code":400,"type":"sto...
- Storage usage keeps going up
I have a self-hosted instance running in production for over a year now. The deployment has seen multiple updates and migrations of Appwrite versions. What I ha...