itinance / itinance/react-native-fs

iOS uploader exposing upload from file method

Open
#1,200 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've recently implemented an ios app extension in some resource constrained environment and found that
when you use multipart requests with ios, you end up reading the entire file into memory and append the form data to it
which can be very resource intensive.

I found that URLSession method for uploading files directly from file, streams the data directly to the server, and consumes a lot less resources.
I think it would be great if you could expose that method as well, in a react-native-fs way.

Also the multipart req in general could be rewritten to stream the data, and not doing
```
[reqBody appendData:fileData];
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.