Rank 3: Container
So, i suspect it has something to do with permission.
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
So, i suspect it has something to do with permission.
Rank 3: Container
however, the file has the read permissin granted to my login account
Is file security enabled?
Rank 3: Container
yes
What's your code?
Rank 3: Container
this is from the bucket setting
Rank 3: Container
and this is at the file level
Rank 3: Container
wait a min. now I can access it. Weird. I simply toggled off and on the "users" access at the bucket setting to investigate
Rank 3: Container
I can now access it with the view link, but when i tried with preview link, it shows 404
Rank 3: Container
Rank 3: Container
this is the preview link: https://cloud.appwrite.io/v1/storage/buckets/message/files/6518d71e7d6aa49ea037/preview?project=huntpile
Rank 3: Container
Is there any difference in permission setting for view and preview?
Rank 3: Container
in conclusion:
Rank 3: Container
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.
Rank 3: Container
Thanks for helping me looking into this.
Rank 3: Container
[SOLVED] 404 error if mode=admin is removed
Rank 3: Container
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?
Rank 3: Container
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.
Rank 3: Container
404 error when previewing bucket image in Flutter app only
Rank 3: Container
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.
Rank 3: Container
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.
Rank 3: Container
Steven has answered in https://discord.com/channels/564160730845151244/1157804153427460126/1158411341908934687
Rank 3: Container
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
Rank 3: Container
Steven's suggestion works perfectly. Thanks @Ernest and @Steven
Rank 3: Container
[SOLVED] 404 error when previewing bucket image in Flutter app only