๐ Bug Report: storage.createFile() looses mimeType and stops at 0 bytes when uploading
trashcoder opened this issue ยท 1 comments
๐ 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?
- I checked and didn't find similar issue
๐ข Have you read the Code of Conduct?
- I have read the Code of Conduct
@trashcoder, thanks for creating this issue! ๐๐ผ Unfortunately, createFile doesn't work with react-native. See #27