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 triggered) Google Drive PUT request fail with 500 Internal Server Error
. File not appears in my Google Drive folder. Error 500 comes in xhr.onload
, not in xhr.onerror
.
Same thing if im trying to upload that file via Google Drive interface. It happens sometimes, and i haven't environment with 100% reproducing.
Filetype Adobe .DNG or Canon .CR2 and filesize ~28MB.
What im doing wrong? Is it known bug or limitations to filetypes or file?
Possible reasons: filesize limitations, filetype limitations, or maybe my token is expires while my file is uploading?
UPD: Im using this uploader as is, only with cosmetic changes.
Individual users can only upload 750 GB each day between My Drive and all shared drives. Users who reach the 750-GB limit or upload a file larger than 750 GB cannot upload additional files that day. Uploads that are in progress will complete.
You can also drag and drop a file into the Google Drive window to begin uploading it immediately. Google Drive supports files up to 5 TB in size (provided you actually have that much storage available).
Up to 1.02 million characters. If you convert a text document to Google Docs format, it can be up to 50 MB.
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.
Query string = (mimeType = 'image/x-adobe-dng' or mimeType = 'image/x-canon-cr2' or mimeType = '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:
{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Backend Error"}],"code": 500,"message": "Backend Error"}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With