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
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...