Im traing to upload multiples images from an array of files. The thing is i want to keep watching the progress of each file.
I have this function
const handleChange = ({ target: { files } }) => {
const uploadingFiles = [...files].map(file => {
uploadFile(file, fieldName, (progress, url) => {
// I would like to return this properties for the map but clarly I can not do that
return {progress, url}
//
})
})
}
// i would like to have an array like this, and keep watching for the progress...
const uploadingFiles = [
{progress:0,url:null},
{prgress:28:url:null},
{progress:100, url:'https://...'}
Is any posible way to do that ?