英文:
Is it possible to upload an entire folder to Google Drive using Google Drive API?
问题
我目前正在探索Google Drive API,能够成功使用Postman上传单个文件。
我尝试使用Google Drive API创建/上传文件夹,但失败了。实际上,我没有看到任何特定用于处理文件夹的API。我尝试使用创建文件的API。
参考链接 - https://developers.google.com/drive/api/v3/reference
将不胜感激任何帮助。
英文:
I am currently exploring Google Drive APIs and am able to upload an individual file using Postman successfully.
I tried to create/upload a folder using Google Drive API but failed. In fact, I don't see any specific API to deal with a folder. I was giving it a try with create files API.
Reference - https://developers.google.com/drive/api/v3/reference
Any help will be appreciated.
答案1
得分: 1
If you check the documentation for files.create you will notice at the top it states
创建文件。
This is singular each request creates a single file. If you want to upload a directory you will need to first create the directory then upload each file one at a time.
You could try batching but I don't think you can batch the file upload itself you could probably batch the metadata creation performance#details
英文:
If you check the documentation for files.create you will notice at the top it states
> Creates a file.
This is singular each request creates a single file. If you want to upload a directory you will need to first create the directory then upload each file one at a time.
You could try batching but I don't think you can batch the file upload itself you could probably batch the metadata creation performance#details
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论