How to upload a file with axios request which can run both in the nodejs and browser env

New post



  • jcleblanc

    Hi ,


    There are a few things to unpack on this one. We asked around the team, and while we have a number of axios samples, they don't show what you're looking for via a buffer. On this front we have an internal ticket filed to spend some time looking at this in the context of chunked uploads, which would provide that information. This is most likely a little ways out on the list but we're tracking it.


    Here are a few things that might help you in what you're looking for:

    • JavaScript SDK: This is part of our community projects and isn't directly maintained by Box, but it will give you a front-end JS solution that may provide the capabilities needed.
    • Node SDK: Using in conjunction with the JavaScript SDK to provide the server-side capabilities for communicating with Box.

    - Jon

    Comment actions Permalink
  • carolbu

    Thanks for your effort looking into this problem.

    I resloved it finally by build up a customized formdata to remove the gap between the browser and NodeJS.


    As you said, I also need to look into the chunked API if the file size is bigger than 50M.


    Thanks again for your reply

    Comment actions Permalink

Please sign in to leave a comment.