react-native-background-upload
react-native-background-upload copied to clipboard
Can't set Authorization header
i try to upload files to the google storage json api. I get the token from a cloud function but when i try to upload the images like this:
this.options = {
customUploadId: _uploadID,
url: url,
path: path,
method: 'POST',
type: 'raw',
header: {
"Authorization": `Bearer ${token}`,
'content-type': 'application/octet-stream',
},
};
i always get an error 401 "Anonymous caller does not have storage.objects.create access to the Google Cloud Storage object." If i try the request in postman everything works fine.
How are the headers added?
@SteveTro it should be called "headers"