Skip to content

🐛 Bug Report: storage.createFile() looses mimeType and stops at 0 bytes when uploading #61

Description

@trashcoder

👟 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions