I want to load image in markdown file. But the problem the image file bucket permission is set to Role.users() Is there any way to allow access only the authenticated user to show the image without passing JWT?
What library are you using for markdown
flutter_markdown:
You can try to implement a custom image builder: https://pub.dev/documentation/flutter_markdown/latest/flutter_markdown/MarkdownWidget/imageBuilder.html
Here's the default one: https://github.com/flutter/packages/blob/04e09ff9372f4558c1a34a712ed6c60f0f755fb2/packages/flutter_markdown/lib/src/_functions_io.dart#L20
Yes there I can use the imageBuilder and pass the JWT with the Image.network header. Can you share a example of using appwrite JWT with Flutter Image.network
Image.network has a header param.
Image.network(
'[your-image-source-url]',
headers: {
'X-Appwrite-JWT': '[your-jwt-here]'
},
);
Will this not work?
Recommended threads
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- Compatibility issue with Kakao OpenID Co...
**Context:** I am attempting to integrate **Kakao Login** (one of the largest social login providers in South Korea) into my Flutter application using Appwrite'...