IIC2233-2015-2 / syllabus

Página principal del curso
48 stars 57 forks source link

[T07] Error subida de archivos #538

Closed sebamenabar closed 8 years ago

sebamenabar commented 8 years ago

Hola, cuando intento subir un archivo al root lo hago de la siguiete forma

self.dbx = dropbox.Dropbox(TOKEN) # Para conexto
with open(file_path, "rb") as file:
    self.dbx.files_upload(file, path_dropbox)

cuando considero al root (path_dropbox) como un string vacio ("") me dice

dropbox.babel_validators.ValidationError: '' did not match pattern '/.*'

Y cuando lo hago con un "/"

dropbox.exceptions.BadInputError: (400, 'Error in call to API function "files/upload": path: invalid path: just "/" is not allowed; for the root, use an empty string')

Ayuda

javierlopeza commented 8 years ago

Tienes que usar / pero agregale el nombre del archivo que subes. Por ejemplo si quieres subir foto.jpg, pathdropbox="/foto.jpg"

El 04-12-2015, a las 00:24, sebamenabar notifications@github.com escribió:

Hola, cuando intento subir un archivo al root lo hago de la siguiete forma

self.dbx = dropbox.Dropbox(TOKEN) # Para conexto with open(file_path, "rb") as file: self.dbx.files_upload(file, path_dropbox) cuando considero al root (path_dropbox) como un string vacio ("") me dice

dropbox.babel_validators.ValidationError: '' did not match pattern '/.*' Y cuando lo hago con un "/"

dropbox.exceptions.BadInputError: (400, 'Error in call to API function "files/upload": path: invalid path: just "/" is not allowed; for the root, use an empty string') Ayuda

— Reply to this email directly or view it on GitHub.

sebamenabar commented 8 years ago

Gracias