I am trying to upload a video file that is not even large around 10MB, but uploading that is taking more than 2-4 minutes and after it is showing 100% uploaded that is complete, after that when I am hitting the pre-signed URL in that I am not getting the video. the video is not reached to s3 bucket I am trying with this code.
await Upload.startUpload(options).then((uploadId) => {
console.log('props Upload started', uploadId);
Upload.addListener('progress', uploadId, (data) => {
console.log(`props Progress: ${data.progress}%`);
});
Upload.addListener('error', uploadId, (data) => {
console.log(`props Error: ${data.error}%`);
});
Upload.addListener('cancelled', uploadId, (data) => {
console.log('props Cancelled!', uploadId, '--', data);
});
Upload.addListener('completed', uploadId, (data) => {
// data includes responseCode: number and responseBody: Object
console.log('props Completed!');
});
}).catch((err) => {
console.log('props Upload error!', err);
});`
I have also tried to upload the video after downgrading the library version to (6.2.0) as i got this from the issue : https://github.com/Vydia/react-native-background-upload/issues/310
but It also had the same outcome.
am I doing something wrong. if anyone knows then please help suggestions are welcomed.
I am trying to upload a video file that is not even large around 10MB, but uploading that is taking more than 2-4 minutes and after it is showing 100% uploaded that is complete, after that when I am hitting the pre-signed URL in that I am not getting the video. the video is not reached to s3 bucket I am trying with this code.
` const options = { url: objectURL, // s3 URL where wanted to upload the file path: filePath, // path of the file method: 'PUT', type: uploadType, // 'raw' or 'multipart' field: 'file', headers: { 'content-type': type, // Customize content-type 'content-length': fileSize, }, parameters: { 'Content-Type': type, 'X-Amz-Algorithm': 'MINE_ONE', 'X-Amz-Date': 'MINE_ONE', 'X-Amz-SignedHeaders': 'MINE_ONE', 'X-Amz-Expires': MINE_ONE, 'X-Amz-Credential': 'MINE_ONEt', 'X-Amz-Signature': 'MINE_ONE', }, };
but It also had the same outcome.
am I doing something wrong. if anyone knows then please help suggestions are welcomed.