Last active
October 28, 2016 00:12
-
-
Save KelviNosse/f8a00d5e47a8d2c076db34e04d0c9d51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dropbox | |
def dbx_upload_file(file_from, file_to, access_token): | |
"""Funcion para subir un archivo a Dropbox usando API v2 | |
""" | |
dropb = dropbox.Dropbox(access_token) | |
with open(file_from, 'rb') as f: | |
dropb.files_upload(f, file_to) | |
access_token = 'Token Privado de Acceso' | |
file_from = "C:\\secret\\dat.txt" # direccion del archivo que se quiere mandar | |
file_to = '/directorio/dat.txt' # la direccion absoluta en dropbox incluyendo el nombre de archivo | |
dbx_upload_file(file_from, file_to, access_token) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment