Hello I am working on an app and have developed code for uploading video that I have taken with a camera setup. The problem I have been facing is that using python 3 I am only capable of uploading a single folder and every time a new video is added every video is reoploaded every time even if it is already present in dropbox. I was hopeing to get to the point were only my code uploads the newest video every time as uploading to dropbox is quite slow and with six plus video files this becomes a big time waste.
My code is below
for dir, dirs, files in os.walk(rootdirx): #Code to upload folder with video info
for file in files:
try:
file_path = os.path.join(dir,file)
dest_path = os.path.join('/', file)
print ('Uploading %s to %s' % (file_path, dest_path))
with open(file_path, 'rb') as f:
dbx.files_upload(f.read(), dest_path, mute=True)
except Exception as err:
print ('Failed to upload %s\n%s' % (file, err))
print('Finsihed uploads')