So, i suspect it has something to do with permission.
however, the file has the read permissin granted to my login account
Is file security enabled?
yes
What's your code?
this is from the bucket setting
and this is at the file level
wait a min. now I can access it. Weird. I simply toggled off and on the "users" access at the bucket setting to investigate
I can now access it with the view link, but when i tried with preview link, it shows 404
this is the preview link: https://cloud.appwrite.io/v1/storage/buckets/message/files/6518d71e7d6aa49ea037/preview?project=huntpile
Is there any difference in permission setting for view and preview?
in conclusion:
- view = working
- preview = 404 error
- preview with admin mode = working
Hi @Steven , I don't know what's wrong. I removed the permission and re-added the same exact permission to that file, and everything works now.
Thanks for helping me looking into this.
[SOLVED] 404 error if mode=admin is removed
Hi @Steven , the issue came back. So, I repeated the same thing (removing the permissions and re-added), and it worked again. Do you think this could be my data error?
Login using the same credential, I can run https://cloud.appwrite.io/v1/storage/buckets/message/files/651a750284dae18644e3/preview?project=huntpile in a React web, but I can't in Flutter app. It just show 404 error. It may not be the permission issue because I can view it in web using the same credential. In Flutter app, I am able to access other buckets' preview images too.
404 error when previewing bucket image in Flutter app only
I deleted the bucket and recreated it, but the outcome is still the same. I can't view the image from flutter app, but able to do it in React web. Same login credentials.
Had a side project I was working with the same issue. At the time, I was mostly hacking stuff together (it wasn't a production app) so I thought I was doing something wrong. I ended up adding guest permission for read only and appending the mode (&mode=guest) to the view url. I know this is doesn't answer the question. Just pointing out the problem has been around for a while.
Steven has answered in https://discord.com/channels/564160730845151244/1157804153427460126/1158411341908934687
Hey @Ernest , thanks very much for your input and for letting me know about the other case that has been resolved by Steven. I will try that now
Steven's suggestion works perfectly. Thanks @Ernest and @Steven
[SOLVED] 404 error when previewing bucket image in Flutter app only
Recommended threads
- [BUG] The cloud cannot be migrated to se...
The cloud cannot be migrated to self-hosting. The content of this post is exactly the same as [issue 11068](https://github.com/appwrite/appwrite/issues/11068) ...
- Rate límit reset
I've made an error in the code by not setting a limit on how much rows should i get per request because i was working with a small db for testing. Last night Iv...
- I reached my budget limit how?
Hi, I got a message saying I reached my budget limit already? Makes no sense? In 4 days I reached 3.4M reads in a project how with only 100 users? This is my pr...