Uploading large files to Google Drive

Hi,
I'm trying to upload a file over 800 Mb.
After some time upload method returns without any exception and file size on google drive is zero.

What can cause this problem?

Hi,

We are not aware of any issues with uploading files in that range of size to Google Drive.
Does the issue occur with any kind of file or only with a specific kind of file?
Does uploading files with that kind of size directly to Google Drive work on your machine?

This problem is not related to type of file. There is no problem on smaller files of same type. Maybe internet connection is a problem.
1- Why upload method dont throw any exception?
2- Is there any built in retry mechanism on failed uploads?

Thank you

I'm not sure what is going wrong on your side.
Can you try to enable logging so I can further investigate this?

Logging can be enabled by setting Logging to True and LogLevel to llDetail.
The log file is automatically generated in the Documents folder.

Unfortunately there is no built-in functionality available to retry failed uploads.
However this is a good suggestion and we'll consider adding this feature in the future.

Could you give me your email for log file?

You can use a private message and include the file or send an email with zipped attachment to help@tmssoftware.com

I've sent it.
By the way retry mechanism would be great. :+1:

Thank you for providing the log file.
We are currently investigating this issue and will report back as soon as possible.

The log file indicates something went wrong during upload of the file. The HTTPS PUT RESULT should include data about the uploaded file, but it is empty.
The reason the upload failed is not clear from the log file. Could you please try using Fiddler to find out the result of the PUT request?

I've no any experience with Fiddler Bart. I think fiddler is not a packet sniffer. Its a proxy. Should I set proxy address to cloud components? What should I specially inspect on fiddler?

Fiddler is a free tool that lets you inspect the https requests that are executed by TMS VCL Cloud Pack.

  • First execute an upload with TAdvGDrive
  • The http request should appear in the left pane
  • Select the Inspectors tab in the right pane
  • Select the Raw tab in both the top and bottom panel
    (see screenshot below)

The result of a valid upload request should read "HTTP/1.1 200 OK".
Could you provide a screenshot so I can further investigate this?

HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
X-GUploader-UploadID: J-9_RtfXPNu7pOGbaGg
Content-Length: 39
Date: Mon, 31 Jan 2022 20:58:25 GMT
Server: UploadServer
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"

Missing end boundary in multipart body.

The error indicates that there was indeed an issue with uploading the file.
This might be a memory related issue, have you tried uploading the file from different machines?

Alternatively you can try using TMS FNC Cloud Pack instead. This product uses a different technique for uploading so it is possible this can better handle uploading the large files you are using.
There is a fully functional trial version available which includes an Overview demo that demonstrates uploading files to Google Drive:

I've tried twice upload 4 GB file to google drive with fnc cloud pack demo (CloudStorageServiceDemoVCL) but in both it stops sending of file at 640.2 Mb. Is there any demo limitation?

Fiddler Log:

HTTP/1.1 200 OK
X-GUploader-UploadID: XXXXXXXXXXXXXXXXXXXXXXXXXXXX-DiL1C7xKW765II1ptcx91QkUGOm4M3aRHd-umgZJWepfA
Vary: Origin
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Wed, 02 Feb 2022 11:16:21 GMT
Content-Length: 590
Server: UploadServer
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"

{
"kind": "drive#file",
"id": "1tPRDiNPo7e5e9EUJz7Qc5-L2OHa3k-xr",
"name": "VIRGO_HID_22_20220123_175018.BAK",
"mimeType": "application/octet-stream",
"parents": [
"XXXXXXXXXXXXXXXXXXXX"
],
"webContentLink": "https://drive.google.com/uc?id=XXXXXXXXXXXXXXXXXXXXXX&export=download",
"webViewLink": "https://drive.google.com/file/d/XXXXXXXXXXXXXXXXXXXXXXXX/view?usp=drivesdk",
"createdTime": "2022-02-02T11:16:20.490Z",
"modifiedTime": "2022-02-02T11:16:20.490Z",
"owners": [
{
"displayName": "XXXXXXXXXXXXXXXX"
}
],
"shared": false,
"size": "671308289"
}

There are no limitations in the demo you used. I'm not sure what is causing this issue. I have now retested uploading a file of 1.5 GB and found no issues.
We'll have to further investigate this.

Can you please provide the following information?

  • How much RAM do you have installed?
  • Which version of Windows are you using?
  • Which version of Delphi are you using?
  • Have you tried uploading files from different machines?
  • Have you tried uploading the file to Google Drive via the Google Drive web interface?

8 GB ram (6.9 GB Free Space)
Windows 10 Pro
Delphi 10.2
Same result on different machines
GDrive web succesfully upload 4.6 gb file

Hi,

We have further investigated this here and have tested with multiple 4gb+ files and couldn't reproduce the issue. We can only think of this as an issue with the file itself, or a specific combination of the file, and the way we build up the post-data to send it to the service. A couple of questions:

  1. Did you always test with the same file?
  2. Is it possible to send us the file, so we can investigate this here?

I've sent download link of file to help@tmssoftware.com

Thank you for the file, we are able to reproduce the upload issue with that file and will further investigate what is going wrong.

Thank you
I hope it will be resolved soon