Description
Describe the bug
I'm replacing react-native-fetch-blob with this library. This library seems to force form-data when using the uploadBlob API. This results in a corrupted upload. (upload is to google cloud storage)
To Reproduce
const request = {
absoluteFilePath: filePath,
method: 'PUT',
mimeType: mimeType || 'application/octet-stream',
url,
onProgressWrap,
progressIntervalMilliseconds: 250,
};
const res = await BlobCourier.uploadBlob(request);
Expected behavior
File is uploaded correctly.
Actual behavior
The headers end up inside the uploaded file:
Screenshots
I opened the binary png file, in a text editor , as you can see its corrupt and the headers are in the uploaded file.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.