joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 772 forks source link

Obtain response blob from local resource. #633

Open luisfuertes opened 3 years ago

luisfuertes commented 3 years ago

I need upload video to S3 storage, but react-native with android have a fetch bug with heavy files. (1min 720 video (160mb))

Im trying to generate blob with rn-fetch-blob, like:

    const fileRes = await RNFetchBlob.fetch('GET', 'content://com.google.android.apps.photos.contentprovider/-1/2/content%3A%2F%2Fmedia%2Fexternal%2Fvideo%2Fmedia%2F1518/ORIGINAL/NONE/video%2Fmp4/866570490')
    const blob = await fileRes.blob()

But it failed with error: Error: RNFetchBlob request error: url == nullnull

rn-fetch-blob use different fetch method than const fileRes = fetch('content://com.google.android.apps.photos.contentprovider/-1/2/content%3A%2F%2Fmedia%2Fexternal%2Fvideo%2Fmedia%2F1518/ORIGINAL/NONE/video%2Fmp4/866570490') ?