我有一个文件夹 ID 和一个应该上传到该 gDrive 文件夹的文件。我尝试了以下方法:
File body = new File();
body.Title = titulo; // titulo is a string that contains the tittle of the file
body.Description = descripcion; // the description, it is a string as well
body.MimeType = setMimetype(rutaArchivo); // and this is a method that sets the mimetype according to the file extension.`
我尝试使用body.Parents
但我没有运气,body.parents.add
只收到一个字符串(我试图提供包含 gdrive 文件夹 id 的字符串),而且我不太了解parents.Insert
.