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
- Column size update error – "Invalid inde...
Hey everyone, I’m running into an issue when trying to update the size of an existing column in my Appwrite database. I’m trying to change the size from 30 to 5...
- Bug on Updating User Limit
I’ve encountered a bug in the Appwrite Cloud UI when attempting to update the user limit to 0. My goal is to disable public registration while still allowing e...
- One org lost all data out of 13 org's af...
> https://<domain>/v1/storage/buckets?queries%5B0%5D=%7B%22method%22%3A%22limit%22%2C%22values%22%3A%5B6%5D%7D&queries%5B1%5D=%7B%22method%22%3A%22offset%22%2C%...