我无法使用swift 3在我的google云端硬盘中上传文件,没有错误,但仍无法上传文件。
let folder = GTLRDrive_File()
folder.name = "hellokitty"
folder.mimeType = "application/vnd.google-apps.folder"
let query1 = GTLRDriveQuery_FilesCreate.query(withObject: folder, uploadParameters: nil)
query1.fields = "demo"
service.executeQuery(query1, completionHandler: {(ticket:GTLRServiceTicket,file:GTLRDrive_File,error:Error?)-> Void in
if error == nil {
print("file id",file.identifier as Any)
}else{
print("error occured",error as Any)
}
} as? GTLRServiceCompletionHandler)