Forum Discussion

ranstyr's avatar
ranstyr
New member | Level 2
9 years ago

download excel file via API & webhock and save it locally

Hi All,

 

The feature I am trying to implement is once customer updates a file, We will download the file and extract some data from it.

 

We implement Dropbox webhook - https://www.dropbox.com/developers/reference/webhooks.

(using Phyton).

 

We are getting to 

f, metadat = client.get_file_and_metadata(path)

 

We are trying to save the file to our firebase database (as our code runs on Node).

 

storageFile = storage.put(f)

 

and getting 

ValueError: total bytes could not be determined. Please pass an explicit size.

 

Any Advice?

 

Thanks,

Ran.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Is the get_file_and_metadata call running successfully? It sounds like that error message is coming from your Firebase database method, so I'm afraid I can't be of much help here. You may want to refer to the documentation/support channels for that instead.

     

    Also, note that you're using Dropbox API v1, which is deprecated. You should migrate to API v2.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 hours ago
352 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!