Back

[SOLVED] Display image in a Flutter app

  • 0
  • Flutter
  • Storage
D5
26 Jun, 2023, 20:21

I'm a bit stuck on this. How I could display an image stored in an Appwrite bucket?

The easiest method I've found is by getting it by passing file ID in the URL, but that is not compatible with authentication. Not sure if it's possible sending headers in this case to send the user token.

TL;DR
User was having trouble displaying an image in a Flutter app from an Appwrite bucket. They were originally getting an HttpException with the message "Invalid statusCode: 404". They found a solution from user Steven and now it works correctly. The issue was that they were not getting the Jwt correctly and when they printed the token, it showed "instance of JWT". The solution involved checking the token and making sure it was retrieved correctly. User also mentioned a possible alternative solution from a Stack Overflow post regarding caching images thumbnails in a ListView.
D5
26 Jun, 2023, 20:22

Display image in a Flutter app

D5
26 Jun, 2023, 20:31
D5
26 Jun, 2023, 21:46

Seems not to work

D5
26 Jun, 2023, 21:46
D5
26 Jun, 2023, 21:50

When printing token, what it gives me is "instace of JWT"

D5
26 Jun, 2023, 22:01

Was not getting Jwt correctly 😵‍💫

D5
26 Jun, 2023, 22:01

Solved. Now it works correctly thanks to Steven solution

D5
26 Jun, 2023, 22:01

[SOLVED] Display image in a Flutter app

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more