Giter Club home page Giter Club logo

Comments (8)

yakovkhalinsky avatar yakovkhalinsky commented on August 22, 2024

You should see a contentLength property in the response of b2.uploadFile() which is in bytes.

https://www.backblaze.com/b2/docs/b2_upload_file.html

from backblaze-b2.

tutankhamen-1 avatar tutankhamen-1 commented on August 22, 2024

I should have been more specific. I'm trying to monitor it in real time in order to build a progress bar.

from backblaze-b2.

yakovkhalinsky avatar yakovkhalinsky commented on August 22, 2024

Not sure you could do that until the module supports multipart uploading.

The upload is a single request to the B2 service with the whole file.

from backblaze-b2.

crazyscience avatar crazyscience commented on August 22, 2024

PR is on the way, folks. The PR will add Promise based progress notifications by extending the request object.

from backblaze-b2.

crazyscience avatar crazyscience commented on August 22, 2024

#21 adds support for progress notifications via deferred.notify(). If it ever merges in, you'll be able to get upload/download/request progress via the third parameter of .then() as such:

b2.someCommand().then(
  function(res) { /* success handler */ },
  function(err) { /* error handler */ },
  function(info) { /* progress handler (called many times) */ }
);

Multi-part uploads are still not supported. However, support should be coming soon. Keep your eyes open.

from backblaze-b2.

yakovkhalinsky avatar yakovkhalinsky commented on August 22, 2024

Good work again from @crazyscience 👍

from backblaze-b2.

crazyscience avatar crazyscience commented on August 22, 2024

The above only worked for v0.9.12 and only worked for download progress reporting. We've changed how progress reporting is handled to take into account both the request (for uploads) and the response (for downloads). As of v1.0.0, a callback function can be passed into relevant b2.method()s. See the README for more information and usage examples. For large, multipart uploads, you will have to write your own code to aggregate across the multiple requests.

from backblaze-b2.

odensc avatar odensc commented on August 22, 2024

This should now be supported with onUploadProgress so I'll close. Please reopen if this is still an issue.

from backblaze-b2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.