Description
Hi,
I build a BynderConnector for the DAMToolkit in which for the past 4 years I have always used assetService.uploadFile(uploadQuery).blockingSingle()
But when uploading larger files I would like to be able give feedback on the progress so I was looking into
Observable obUp = assetService.uploadFileWithProgress(uploadQuery)
But I'm not very familiar with React Observables.
Would you have an example how to work with them to output a progress
I was trying something like this but couldn't find a "next()" method:
UploadProgress nextUp=null;
long bytes=0;
while ( true)
{
nextUp=obUp.next()
if (nextUp==null || nextUp.isFinished())
break;
bytes=pro.getTransmittedBytes();
System.out.println("upload progress: "+bytes+" bytes ");
}
System.out.println("upload finished");
Thank you for any help.
Peter Van de Poele
damtoolkit.be
Activity