Rank 2: Process
If you click on the actual link to the img, does it show the img?
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
If you click on the actual link to the img, does it show the img?
Admin
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
Rank 1: Thread
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.
Rank 1: Thread
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?
Rank 1: Thread
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.
Rank 1: Thread
ok so I have fixed it @Steven and @mc-stephen but I want to find out if using the &mode=admin is right?
Rank 2: Process
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
Rank 1: Thread
Alright. You could share the doc on this particular section as well so I check it out.
Admin
Yes, this is the correct path. This is not what you had before. Also, in your client app, you shouldn't include mode=admin
Rank 1: Thread
When I remove mode=admin it doesn't show though.
Rank 2: Process
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
Rank 2: Process
this storage api should help you solve your issues => https://appwrite.io/docs/references/cloud/client-web/storage#getFile
Rank 2: Process
if you can't, simple send a sample of your code here and i will help you debug it
Admin
Is this a flutter web app?
Rank 2: Process
i don't think it would make much diff if focus on web or mobile, but am certian it is a flutter project
Rank 2: Process
don't really know why he his not using the appwrite pluggin for flutter
Admin
For web, it could be a 3rd party cookie problem
Rank 2: Process
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
Rank 1: Thread
No, it is a flutter mobile app.
Rank 1: Thread
I am using appwrite plugin.
Admin
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
Admin
Rank 1: Thread
Seen @Steven but I am wondering at what point should I called createJwt()
Admin
Up to you. Some time before you use the network image url
Rank 1: Thread
Alright. Thanks.