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:
- GoogleDrive uploader checks Content-Type, even if convert option is set to false.
- GoogleDrive fails from time to time with this convertation.
- Uploader works fine with Content-Type == 'application/octet-stream'.
- GoogleDrive query string keyword title doesn't contain file extension, but in response titles have extension.
- GoogleDrive query string keyword fullText contains filename with extension (mb its not very fast for text files).
- To test your request you can use this tool https://developers.google.com/drive/v2/reference/files/list in the end of page.
- 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"}}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…