Hi I am unable to post Image on my appwrite storage. I am using React-Native please review my code
export const uploadImageToAppwrite = async (urin) => { try { const result = await storage.createFile( appwriteConfig.storageId, ID.unique(), { name: "photo.jpg", type: "image/jpg", uri: urin, }, [ Permission.read(Role.any()), Permission.update(Role.users()), Permission.delete(Role.users()), ] );
console.log("File uploaded successfully:", result);
} catch (error) { console.error("File upload failed:", error); } };
What version of the RN SDK are you using?
Recommended threads
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- My organization's project is blocked
My organization's project is blocked so unblocked my organization then I will this
- [SOLVED] React Native Appwrite SDK not w...
So I'm trying to generate a unique ID using the ID.unique() and its generating properly, but its saying its longer than 36 characters but it isnt.. ```typescri...