cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Url of the file instead of a buffer in uploadSessionAppendV2?

Url of the file instead of a buffer in uploadSessionAppendV2?

AlexBrajkovic
Explorer | Level 4
Go to solution

Is it possible to send url to the file in call to sessionappendv2 or sessionstart. The reason is that whenever I try to upload files in sequence, I am getting memory leaks in node, becase it keeps the result  of reedFile() in memory, which I must call sequentally. If sum of all parts of splitted file is bigger than 500mb it throws `FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory`

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

No, unfortunately the API v2 JavaScript SDK only supports supplying the file content as string or buffer, but I'll be sure to pass this along as a feature request.

 

The incorrect_offset error is documented as:

 

"The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error."

 

Your sample has the server just a few bytes behind the client though, so it's likely not due to a missed response as in the example in the documentation.

 

Instead, you may not be supplying the length of data you expect, or there may otherwise be some logic error in your upload session code. I recommend adding some extra logging to your code to see when/where the missing data is occuring.

View solution in original post

2 Replies 2

AlexBrajkovic
Explorer | Level 4
Go to solution

2. Also I have a problem with incorrect_offset error. It seems that the error is in order of few bytes. For example  I am sending offset value as 426046040, but getting error with info "correct_offset" : 426046036. Just 4 bytes. 
And when I upload some other file, the difference is 1 byte.

Greg-DB
Dropbox Staff
Go to solution

No, unfortunately the API v2 JavaScript SDK only supports supplying the file content as string or buffer, but I'll be sure to pass this along as a feature request.

 

The incorrect_offset error is documented as:

 

"The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error."

 

Your sample has the server just a few bytes behind the client though, so it's likely not due to a missed response as in the example in the documentation.

 

Instead, you may not be supplying the length of data you expect, or there may otherwise be some logic error in your upload session code. I recommend adding some extra logging to your code to see when/where the missing data is occuring.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    AlexBrajkovic Explorer | Level 4
What do Dropbox user levels mean?