objective-c
  • google-drive-sdk
  • 2013-07-08 87 views 2 likes 
    2

    在創建文件夾之前試圖檢查文件夾是否存在於「appdata」文件夾中。因此,我做得到用的File.List下面的代碼:
    「appdata」文件夾內的搜索文件夾

    GTLQueryDrive *folderExistsQuery = [GTLQueryDrive queryForFilesList]; 
    folderExistsQuery.q = [NSString stringWithFormat:@"mimeType='application/vnd.google-apps.folder' and trashed=false and 'appdata' in parents and title='%@'",folderName]; 
    

    結果是error.Strange的事情當我刪除查詢我沒有得到任何錯誤或者'appdata' in parentstitle='%@'選項。有人可以請你解釋這裏出了什麼問題嗎?

    對解決方案的任何修改也是受歡迎的。

    編輯
    錯誤的打印描述:

    Error Domain=com.google.GTLJSONRPCErrorDomain Code=500 "The operation couldn’t be completed. (Internal Error)" UserInfo=0x1030d5c00 {error=Internal Error, NSLocalizedFailureReason=(Internal Error), GTLStructuredError=GTLErrorObject 0x10308d890: {message:"Internal Error" data:[1] code:500}} 
    
    +0

    請告訴我的錯誤? –

    +0

    什麼是您的授權範圍? –

    +1

    @BurcuDogan範圍是:'https:// www.googleapis.com/auth/drive.appdata' – Raviprakash

    回答

    1

    有與包含在drive.appdatadrive.file範圍標題和家長詢問的問題。如果我們不打破安裝的應用程序,您可以暫時添加drive.readonly.metadata。該修復已被推回,但我試圖確保我們儘快修復它。

    另一個類似的問題:Error when listing files with query

    +0

    幸運的是,我的應用尚未發佈。希望你們儘快修復。 – Raviprakash

    +0

    我在appdata文件更新期間遇到了類似的錯誤(不是文件搜索) - http://stackoverflow.com/questions/23707388/unable-update-file-store-in-appdata-scope-500-internal-server-error你認爲這些問題密切相關?謝謝。 –

    0

    在API的當前版本,以獲得在應用程序文件夾的文件列表spaces屬性用於:

    GTLQueryDrive * query = [GTLQueryDrive queryForFilesList]; 
    query.q = @"mimeType = 'application/vnd.google-apps.folder' and trashed = false"; 
    query.spaces = @"appDataFolder"; 
    
    相關問題