You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.
Hey there,
I have a problem with sending a file as a blob. The Code Snippet below comes from a React-Native app. I have to get Permissions because of the Permissions System in Android, and whenever the RNFetchBlob.fetch(...) runs, it outputs this:
RNFetchBlob failed to create single content request body :error when getting request stream: Permission denied
Since the server I PUT to doesn't spit an error, I suspect this is a local issue. Since this isn't covered in the README, I figured maybe you can help me 😄
Sincerely,
Simon
DocumentPicker.show({filetype: [DocumentPickerUtil.allFiles()],},(err,res)=>{PermissionsAndroid.requestMultiple([PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE,PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,],{title: 'Permission',message: 'We need your permission.',},).then((permRes)=>{if(permRes['android.permission.READ_EXTERNAL_STORAGE']===PermissionsAndroid.RESULTS.GRANTED&&permRes['android.permission.WRITE_EXTERNAL_STORAGE']===PermissionsAndroid.RESULTS.GRANTED){const{
user,
pass,
uri
}=this.props.currentShareconstdestination=`${uri}/${res.fileName}`constsrc=RNFetchBlob.wrap(encodeURI(res.uri))RNFetchBlob.fetch('PUT',destination,{Authorization: `Basic ${newBuffer(`${user}:${pass}`).toString('base64')}`,'User-Agent': 'BSync/1.0.0','Content-Type': res.type,},src,)}elseconsole.warn('Permission Denied')}).catch(err=>console.warn(err))})
The text was updated successfully, but these errors were encountered:
Hey there,
I have a problem with sending a file as a blob. The Code Snippet below comes from a React-Native app. I have to get Permissions because of the Permissions System in Android, and whenever the RNFetchBlob.fetch(...) runs, it outputs this:
Since the server I PUT to doesn't spit an error, I suspect this is a local issue. Since this isn't covered in the README, I figured maybe you can help me 😄
Sincerely,
Simon
The text was updated successfully, but these errors were encountered: