Create progress bar for ArrowDB pre-built Files API

40 views Asked by At

I created an upload functionality in my app based on the pre-built API of ArrowDB to upload "Files". That works very well so far and reduces the issues on developer-side (great work, Appcelerator! :D) - I want to build now a progress bar, where the user is able to see how far the upload currently is, because in the today's world an iPhone image can easily be a couple of mega bytes and the internet connections depends...

The example code of the documentation looks as follows:

  Cloud.Files.create({
        name: 'test.dat',
        file: Titanium.Filesystem.getFile('test.dat')
        }, function (e) {
        if (e.success) {
            var file = e.files[0];
            alert('Success:\n' +
                'id: ' + file.id + '\n' +
                'name: ' + file.name + '\n' +
                'updated_at: ' + file.updated_at);
        } else {
                alert('Error:\n' +
                    ((e.error && e.message) || JSON.stringify(e)));
            }
  });

Source: http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-create

The problem: It seems only to return one status at the end, it can be "e.success" - or everything else - handled as an arrow...

Thanks for any help!

1

There are 1 answers

1
Fokke Zandbergen On

At this moment it is not possible to get updates on the upload status.