![]() ![]() ![]() local property in files variable is the local file location, remote is the remote file name. When this Python files is executed it will try to push the set of files in files variable and you can see these in Dropbox app folder which you created. error ( e )Ĭlick here - To create a new app and get the Dropbox access token. ![]() info ( response ) except Exception as e : logger. put_file ( file, f, overwrite = True ) logger. info ( "Uploading: " + file ) try : f = open ( file, 'rb' ) response = client. DropboxClient ( ACCESS_TOKEN ) # File to backup: files = for file in files : logger. info ( "Starting process!" ) # Get dropbox client instance: client = dropbox. DEBUG, format = ' %(asctime)s - %(levelname)s - %(message)s ', datefmt = '%Y-%m- %d %H:%M:%S' ) logger = logging. basicConfig ( filename = LOG_FILE, level = logging. #!/usr/bin/env python import dropbox, logging # Constants Config: ACCESS_TOKEN = "" LOG_FILE = "/var/# Login Config: logging. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |