Hello! I'm using React Native and Expo, trying to upload a csv file to my appwrite storage bucket, but can't seem to get it to work. Here's some example code:
const data = [{ foo: "foo" }, { bar: "bar" }]; const file = await storage .createFile(storageId, ID.unique(), data) .catch((error) => { throw error; });
I've verified that my storageId is correct, and my permissions and settings for the bucket are also correct. The above code doesn't throw any errors, but also doesn't upload anything to the bucket. I've also tried using blob and file types with:
const blob = new Blob([data], { type: "text/csv;charset=utf-8" }); const file = new File([blob], "file.csv", { type: "text/csv" });
But these either result in "Empty file passed to endpoint" errors or successfully upload the file to the bucket, but without any data inside of it. I can't seem to find any help online with csv files in buckets and any help with what I might potentially be doing wrong or what I might be missing would be greatly appreciated!
Recommended threads
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- Deep Linking & Password reset
I am using react native with expo. I want to implement deep link with the url recived via email. So when clicked the link it opens my app. I havent ever used de...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...