Skip to content Skip to sidebar Skip to footer

Google Drive Uploading File Size Limit

Im trying to upload my files to Google Drive via REST API (resumable upload). Everything looks good (XMLHttpRequest triggers onprogress and onload events), but after it (onload tri

Solution 1:

OK. I got it.

Files uploads successfully with Content-Type == "application/octet-stream". Looks like bug on GoogleDrive side with mime-type'd files. In this scenario my raw files (DNG, CR2, NEF etc.) stores in GoogleDrive with incorrect mime-type (as a result there is no preview for these files).

So i can't filter files by mime-type anymore.

Querystring= (mimeType = 'image/x-adobe-dng'ormimeType='image/x-canon-cr2'ormimeType='image/x-nikon-nef').

I tried to filter files by keyword title, but looks like titles doesn't contain extension, but in response item titles contain extension.

Query string = (title contains'.dng'or title contains'.cr2'or title contains'.nef').

So i have to filter my files not by mime-type or by title, but by fullText keyword.

Query string = (fullText contains'.dng'or fullText contains'.cr2'or fullText contains'.nef').

Conclusion:

  1. GoogleDrive uploader checks Content-Type, even if convert option is set to false.
  2. GoogleDrive fails from time to time with this convertation.
  3. Uploader works fine with Content-Type == 'application/octet-stream'.
  4. GoogleDrive query string keyword title doesn't contain file extension, but in response titles have extension.
  5. GoogleDrive query string keyword fullText contains filename with extension (mb its not very fast for text files).
  6. To test your request you can use this tool https://developers.google.com/drive/v2/reference/files/list in the end of page.
  7. GoogleDrive API crashes from time to time with HTTP status 500 Internal Server Error:

{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Backend Error"}],"code": 500,"message": "Backend Error"}}

Solution 2:

I think this would be related to raw photo files, because DRIVE tries to convert them to JPG as is done in Google+, unless you specify convert=false. You should specify in your upload API to not convert that files.

This second post says that it will allow you to preview the file up to 25MB, this size limitation could be related with your troubles. Maybe you could try to upload another photo with less than that size to ensure it's not this the limitation.

Solution 3:

I have also seen this 500 error with google analytics a few times and its normaly due to the fact that the server is busy. If I wait a bit and try again it works. Try reading this https://developers.google.com/drive/handle-errors#implementing_exponential_backoff This worked form me with Google Analtyics API, normaly by the time it gets to step 6 its got access again. Haven't tried it with google Drive, but then i havent tried to upload a 25m file before. But i'm betting thats your problem.

Post a Comment for "Google Drive Uploading File Size Limit"