Google-api-python-client: Youtube video uploads of files larger than 64 GB are refused

Created on 22 Feb 2017  路  7Comments  路  Source: googleapis/google-api-python-client

The client refuses to upload files bigger than 64GB. Why is that? The Web interface accepts those files and the API should technically be able to handle it. I tried to replace lines 431 and 433 in /googleapiclient/discovery.py with return int(9223372036854775807) and it works, but this is just a hack of cause. Is there any reason why this limit should not be raised?

This issue was discovered downstream: https://github.com/tokland/youtube-upload/issues/153

p2 acknowledged bug

Most helpful comment

The limit actually seems to come from the API itself, see https://github.com/google/google-api-python-client/blob/20af04d379e079b7a70fa493336307e11d6f50dd/googleapiclient/discovery.py#L546

@lukesneeringer any ideas?

All 7 comments

The limit actually seems to come from the API itself, see https://github.com/google/google-api-python-client/blob/20af04d379e079b7a70fa493336307e11d6f50dd/googleapiclient/discovery.py#L546

@lukesneeringer any ideas?

@NeoTheThird Turns out your workaround did not work for me. Stopped at 64gb. Pinging @lukesneeringer :)

I haven't actually tried uploading a 64+GB file because my connection won't support it at the moment, but the API now returns "5120GB" as the maxSize from discovery using v3 of the API.

{'description': 'Creates a new file.',
 'httpMethod': 'POST',
 'id': 'drive.files.create',
 'mediaUpload': {'accept': ['*/*'],
                 'maxSize': '5120GB',
...

As a result, I am closing this issue, because I believe this was a server-imposed limitation. If anyone believes this is in error, please reopen or comment. Thanks!

{'description': 'Creates a new file.',
'httpMethod': 'POST',
'id': 'drive.files.create',
'mediaUpload': {'accept': ['/'],
'maxSize': '5120GB',

this still seems to be an issue, I think the confusion comes from the fact that we're talking about youtube.insert which should return "128GB" rather than drive.create which does return "5120GB"

and I can confirm it doesn't work when uploading to youtube, I tried faking the first method that checks the api maxSize to return 128GB so the upload starts, but after uploading 70GB, at the end of the file the API explodes saying that the maximum upload size is 64GB, just tried last night, pinging @mcdonc

@CaViCcHi, Would you mind opening a new issue and referencing this one? We unfortunately are more likely to miss comments made on older issues.

@busunkim96 Done, thanks :)

Was this page helpful?
0 / 5 - 0 ratings