[英]google cloud storage issue
我正在使用Google雲存儲將圖像存儲在android上。我在google developers console
創建了項目,並提供了該項目的所有ID。
private static final String PROJECT_ID_PROPERTY = "xxxxxxxxxxxxxx"; //project ID
private static final String APPLICATION_NAME_PROPERTY = "refined"; //application name, can be any
private static final String ACCOUNT_ID_PROPERTY = "xxxxxxxxxxxxxxx-n5kqcd842faki0se7s82vpcf9l1rbvui@developer.gserviceaccount.com"; //user account email
下載P12
文件並從代碼中訪問以設置p12 key
。
當我嘗試2天后,圖像已正確上傳,並且可以在瀏覽器中看到它們。但是,當我今天嘗試相同的代碼時,則出現了禁止的問題。
{"code":403,"errors": [{"domain":"global","message":"Forbidden","reason":"forbidden"}],"message":"Forbidden"}
可能是什么原因?
我可以解決問題...問題是有權限的...我在存儲區上為客戶端ID授予了寫權限,然后它就可以工作了。
謝謝大家
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.