Report this

What is the reason for this report?

How to get progress informations for spaces while uploading big file

Posted on March 31, 2021

I’m trying to use Digital Ocean Spaces as file storage for my Flutter application.

In general I can start upload and download operations. But I can’t find a way to get progress informations.

I tried to set a bucket event like this:

void bucketListener() {
    // Listener
    final poller = minio.listenBucketNotification(bucket, events: [
      's3:PutObject:*',
    ]);
    poller.stream.listen((event) {
      print(event);
      print('--- event: ${event['eventName']}');
      // Get.find<EntriesController>(tag: "newEntry").videoUploadProgress[0];
    });
  }

But this listener not fires. Then here I found that Digital Ocean does not support Bucket Informations: https://developers.digitalocean.com/documentation/spaces/

Is there a way to get the upload progress when using the Digital Ocean storage? Is there a specific event I can use?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Unfortunately, DigitalOcean Spaces does not support bucket event notifications like Amazon S3, but it’s a great idea and it sounds like it’d be super useful!

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

Therefore, you won’t be able to use the listenBucketNotification method with Spaces to get the progress of the upload.

As an alternative, consider monitoring the upload progress using client-side code in your Flutter application. You can measure progress by evaluating the number of bytes sent in relation to the total size of the file during the file upload/download process.

To learn more about DigitalOcean Spaces, visit the Spaces documentation.

Hope that helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.