How to get the upload progress for each file during multiple image uploading?
I'm mapping through images and uploading them from a Realm DB. when uploading two images, the images upload progress sync to each other instead of running separately.
Upload.getFileInfo(finalPath).then(metadata => {
//console.log('image name of file', image.file_name)
Upload.startUpload(options)
.then(uploadId => {
console.log(
Upload started with options: ${JSON.stringify(options)},
);
{
Upload.addListener('progress', uploadId, data => {
console.log(Progress of ${uploadId}: ${data.progress}%);
realm.write(() => {
image.upload_progress = data.progress / 100;
});
});
})}
what can I do to make every image take it's own progress?
thanks!
the uploadId should be there to differentiate between uploads
the
uploadIdshould be there to differentiate between uploads
Can you tell me where to put it? Because the progress listener is inside the then of uploadId Thanks!
can you provide a bigger/formatted example?