We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

simon_schva's avatar
simon_schva
Helpful | Level 6
8 years ago

To upload a file I use "client.put_file(filename, f)" what should I use to download?

Hi, I'm uploading files to Dropbox from an Arduino Yun using the Python.

 

This is the code (working fine) I use to upload

 

# -*- coding: utf-8 -*-
import dropbox
import datetime
suffix = datetime.datetime.now().strftime("%Y%m%d%H%M")
filename = suffix + ".jpg"
client = dropbox.client.DropboxClient('my token here')
f = open('/mnt/sda1/pic.jpg', 'rb')
response = client.put_file(filename, f)
print "uploaded:", response

can you please show me the equivalent to download a file named "myfile.txt" an store it with the same name on the Yun's directory "/mnt/sda1/"

 

Many thanks in advance

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 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!