문제

HTTP Method: POST

Request URI: https://www.googleapis.com/upload/drive/v2/files

Here is the request info generated by the Playground:

POST /upload/drive/v2/files HTTP/1.1
Host: www.googleapis.com
Uploadmypic: image/jpeg
Content-length: 92818
Content-type: image/jpeg
Authorization: Bearer ya29.1.LongKeyHereThatIveReplaceWithThis

A .jpg file was read from my hard drive, then saved to my Google Drive. The file saved to my Google Drive had no name. Name=Untitled

How do I create a file with a name, rather than 'untitled'?

도움이 되었습니까?

해결책

You need to provide a File resource as the body of the POST request. The File resource contains a title property which is the file name. If you try https://developers.google.com/drive/v2/reference/files/insert#try-it you will see the precise format.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top