Open aksiksi opened 4 years ago
File upload/create: https://developers.google.com/drive/api/v3/reference/files/create
Example curl request to upload file to a folder (two steps):
$ curl -i --request POST "https://www.googleapis.com/upload/drive/v3/files?uploadType=resumable&key=YOUR_KEY" --header 'Content-Type: application/json' --header 'Authorization: Bearer YOUR_TOKEN' --data '{"name": "hello.txt", "parents": ["0B9bIgbhJcgN1VkhESjRqR1F4Q3c"]}' HEADERS: location: LOCATION_URL
$ curl -i --request PUT "LOCATION_URL" -H "Content-Type: text/plain" -H "Content-Length: 14" --data-binary "@/home/work/Downloads/hello.txt" RETURNS: { "kind": "drive#file", "id": "167IzkdvqywxEfbU_b6wwQJ1ErNCe4rsm", "name": "hello.txt", "mimeType": "text/plain" }
api_key
Related to #17.
Links
Notes
Endpoints
File upload/create: https://developers.google.com/drive/api/v3/reference/files/create
Example curl request to upload file to a folder (two steps):
TODO
api_key
column in DB (optional for GDrive, used for tracking)Related to #17.