-1
我使用函數來創建具有模板的元數據。但它拋出異常 com.box.sdk.BoxAPIException:該API返回錯誤代碼:404com.box.sdk.BoxAPIException:該API返回了一個錯誤代碼:404
createMetadata(typename, scope, metadata);
我使用函數來創建具有模板的元數據。但它拋出異常 com.box.sdk.BoxAPIException:該API返回錯誤代碼:404com.box.sdk.BoxAPIException:該API返回了一個錯誤代碼:404
createMetadata(typename, scope, metadata);
我這樣做,它似乎工作。
BoxFile file = new BoxFile(api, "113280761775");
file.createMetadata(new Metadata().add("/test", "test"));
Metadata metadata = file.getMetadata();
System.out.println("printing out meta-data: " + metadata.get("/test"));
當我們用「全局」範圍創建元數據時,沒有問題。 在這種情況下,我創建了字段字符串,數字或日期的元數據模板。但是,當用字段賦值是數字時,它會在代碼400時拋出BoxException。示例: JsonObject jsonObject = new JsonObject(); jsonObject.add(「/ title」,「title」); jsonObject.add(「/ author」,「author」); jsonObject.add(「/ amount」,10); 元數據customerMetaData =新元數據(jsonObject); uploadedFile.createMetadata(「TemplateTest」,customerMetaData); With TemplateTest has field'amount'is Number –