appwrite/sdk-for-web

๐Ÿ› 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);

Bildschirmfoto 2023-07-03 um 23 23 00

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?

@trashcoder, thanks for creating this issue! ๐Ÿ™๐Ÿผ Unfortunately, createFile doesn't work with react-native. See #27