Skip to content

java sdk uploadFile vs uploadFileWithProgress #124

Open
@petervandepoele

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions