Expo Image and Appwrite headers #10042
Unanswered
karolkulesza1
asked this question in
Q&A
Replies: 1 comment
|
import { Image } from "expo-image";
const fileUrl = storage.getFileViewURL(bucketId, fileId);
<Image
source={{
uri: fileUrl.toString(),
headers: client.getHeaders(),
}}
style={{ width: 200, height: 200 }}
contentFit="cover"
/>This assumes For a public file, the headers are unnecessary and this is enough: <Image source={{ uri: fileUrl.toString() }} />Avoid putting an Appwrite API key in a mobile app. If the first version still returns 401, check that the signed-in user has read permission on the file and that the session was applied to this exact |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey all,
I've been stuck on something that is probably quite simple. My users fetch their uploaded images from the Appwrite database and they are displayed, which works fine, but I'm trying to move away from RNImage to expo-image for displaying and I'm struggling to find any documentation on what to paas in headers for authentication.
Can anyone point me in the right direction for usage of expo-image with Appwrite?
All reactions