Google Drive API - 创建重复的文件夹 [英] Google Drive API - Creates duplicate folders

查看:517
本文介绍了Google Drive API - 创建重复的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将程序上传到Google Drive的Java程序。我发现,如果我尝试上传到现有文件夹,那我必须确保它对现有文件夹是区分大小写的。如果我的现有文件夹位于标有HDDoc的Root上,则必须将路径输入为/ HDDocs / 10/05/01。这样做可以正常工作,并且只要我使用mu个人Gmail帐户,文件就会上传到Google云端硬盘上的正确路径。只要我尝试在我的Google Apps帐户上执行此操作,就会创建一个全新的文件夹,也称为HDDOcs,并且这些文件会加载到此文件夹中,而不是原始文件夹。

I am developing a Java program that will upload documents to Google Drive. I found that if I try to upload to an existing folder, that I have to make sure that it is case sensitive to the existing folder. If my existing folder is on the Root labelled HDDocs, then I must input the path as "/HDDocs/10/05/01". Doing this works fine and the files are uploaded to the correct path on Google Drive - as long as I use mu personal gmail account. As soon as I try to do this on my Google Apps account, a brand new folder is created, also called HDDOcs and the files are loaded into this folder, and not the original.

因此,在我的Google应用云端硬盘中,我有两个标有HDDoc的根文件夹。

So on my Google App Drive, I have two root folders labeled HDDocs.

任何反馈都会很棒。

Any feedback would be great.

推荐答案

Google云端硬盘中的文件和文件夹名称不是唯一的,因此您不应该依赖它来确定您的目标。相反,您应该始终使用唯一的ID。

File and folder names in Google Drive are not unique, so you should't rely on that to identify your targets. Instead, you should always use the unique id.

这篇关于Google Drive API - 创建重复的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆