If you click on the actual link to the img, does it show the img?
That is not the right path for the image. Thats the url of the image in the console, but not of the actual image itself
This is a sample of the image link https://cloud.appwrite.io/v1/storage/buckets/$bucketId/files/$fileId/view?project=$projectId&mode=admin
This is the file path I see when I copy the image from the console.
Do I need to append this line for the image file? 'view?project=$projectId&mode=admin'
Because that seems to be the only thing I am not passing but if I do that, isnt that kind of wrong?
It opens the console as Stephen said, not the actual image. To open the actual image I need this link https://cloud.appwrite.io/v1/storage/buckets/$bucketId/files/$fileId/view?project=$projectId&mode=admin
But I am not sure appending mode=admin is safe.
ok so I have fixed it @Steven and @mc-stephen but I want to find out if using the &mode=admin is right?
Not sure if it right, but certain it won't do anything wrong, tho I am not sure why u need to add that to the params before the img could show, I might have to look at the doc for that and get back to you latter in the day
Alright. You could share the doc on this particular section as well so I check it out.
Yes, this is the correct path. This is not what you had before. Also, in your client app, you shouldn't include mode=admin
When I remove mode=admin it doesn't show though.
if you are not using an sdk for this then i will suggest you use the appwrite sdk for flutter that will help ease the stress, that way you can get any file hosted on your appwrite storage instant
this storage api should help you solve your issues => https://appwrite.io/docs/references/cloud/client-web/storage#getFile
if you can't, simple send a sample of your code here and i will help you debug it
Is this a flutter web app?
i don't think it would make much diff if focus on web or mobile, but am certian it is a flutter project
don't really know why he his not using the appwrite pluggin for flutter
For web, it could be a 3rd party cookie problem
since he said adding "mode=admin" make it works and not adding it does not, i don't really thinks it might be a cookie problem, that is why i suggested he share his code, he might be doing somthing wrong
No, it is a flutter mobile app.
I am using appwrite plugin.
Oh wait. If you're using a url like this, the network image widget doesn't have the session so it will be making an unauthenticated request
Seen @Steven but I am wondering at what point should I called createJwt()
Up to you. Some time before you use the network image url
Alright. Thanks.
Recommended threads
- Current User is Not authorized
recreating same Thread
- 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...