



Make sure the file you are trying to upload is located on a local hard drive and not on a network, USB or FireWire drive: Sometimes the extra latency or an intermittent connection can cause issues when uploading files that are not located directly on the hard drive of the computer from which you are uploading. Some may have limits on the size of the file that can be uploaded, and others just handle uploads very poorly. Make sure you are connected directly to the internet and not through a proxy: Proxy servers can cause problems with large file uploads. Some of these applications can cause serious problems with your internet connection.

Here are some things to try that might help if you are having problems uploading successfully.ĭisable any anti-virus, anti-malware, anti-spyware, or “internet protection suite” software you may have running while uploading: These kinds of applications are known to cause problems with large file uploads. When I run python uploadfile.py cmd screen stays like that eternally:Ĭan someone help to discover how to make this work? I am not a professional programmer and I am stuck into this for almost two hours trying to make this work.Is your upload not working? Unfortunately, there are several different reasons why uploads can fail. Print('Uploaded "%s" (%s)' % (filename, res)) Res = DRIVE.files().create(body=metadata, media_body=filename).execute() Media_body = MediaFileUpload(filename, chunksize=1024*256, resumable = True) Store = file.Storage(r'C:\Users\lucas.rezende\.credentials\storage.json')įlow = client.flow_from_clientsecrets(r'C:\Users\lucas.rezende\.credentials\client_secret.json', scope=SCOPES)Ĭreds = n_flow(flow, store, flags) if flags else n(flow, store)ĭRIVE = build('drive', 'v3', http=thorize(Http())) Upload.py from _future_ import print_functionįrom apiclient.http import MediaFileUploadįrom oauth2client import file, client, toolsįlags = argparse.ArgumentParser(parents=).parse_args() When I manually upload the same large file to GD it takes less than 10 seconds, so I assume my connection is not the problem. This script works for small files, but not when I try to upload a large file (250MB).
