Closed trashcoder closed 9 months ago
When using sdk-for-web for react-native createFile looses the mimetype and stops at 0 bytes when uploading a file
const blob = new Blob(['Hello World'], { type: 'plain/text', } as BlobOptions); //@ts-ignore const file = new File([blob], fileName, {type: blob.type}); const response = await storage.createFile(BUCKET_ID, ID.unique(), file);
The same behaviour is when i upload an image from rn-image-picker.
it should upload a file and keeping the mimetype.
it stops at 0 bytes and looses the mimeType.
Different version (specify in environment)
Linux
Appwrite Client Version: 11.0.0 Appwrite Server: 1.3.7 React-Native Version: 0.71.11
@trashcoder, thanks for creating this issue! ๐๐ผ Unfortunately, createFile doesn't work with react-native. See https://github.com/appwrite/sdk-for-web/issues/27
๐ Reproduction steps
When using sdk-for-web for react-native createFile looses the mimetype and stops at 0 bytes when uploading a file
const blob = new Blob(['Hello World'], { type: 'plain/text', } as BlobOptions); //@ts-ignore const file = new File([blob], fileName, {type: blob.type}); const response = await storage.createFile(BUCKET_ID, ID.unique(), file);
The same behaviour is when i upload an image from rn-image-picker.
๐ Expected behavior
it should upload a file and keeping the mimetype.
๐ Actual Behavior
it stops at 0 bytes and looses the mimeType.
๐ฒ Appwrite version
Different version (specify in environment)
๐ป Operating system
Linux
๐งฑ Your Environment
Appwrite Client Version: 11.0.0 Appwrite Server: 1.3.7 React-Native Version: 0.71.11
๐ Have you spent some time to check if this issue has been raised before?
๐ข Have you read the Code of Conduct?