@@ -63,7 +63,8 @@ public BoxFileRequest.Info copyInfo(String folderId) {
6363 request .setBody (body .toString ());
6464 try (BoxJSONResponse response = request .send ()) {
6565 JsonObject jsonObject = Json .parse (response .getJSON ()).asObject ();
66- return new Info (jsonObject , this .getAPI ().getBaseAppUrl ());
66+ String id = jsonObject .get ("id" ).asString ();
67+ return new BoxFileRequest (this .getAPI (), id ).new Info (jsonObject , this .getAPI ().getBaseAppUrl ());
6768 }
6869 }
6970
@@ -91,8 +92,8 @@ public BoxFileRequest.Info copyInfo(BoxFileRequest.Info info, String folderId) {
9192 request .setBody (body .toString ());
9293 try (BoxJSONResponse response = request .send ()) {
9394 JsonObject jsonObject = Json .parse (response .getJSON ()).asObject ();
94- info . update ( jsonObject );
95- return new Info (jsonObject , this .getAPI ().getBaseAppUrl ());
95+ String id = jsonObject . get ( "id" ). asString ( );
96+ return new BoxFileRequest ( this . getAPI (), id ). new Info (jsonObject , this .getAPI ().getBaseAppUrl ());
9697 }
9798 }
9899
@@ -199,7 +200,7 @@ public Info(String json) {
199200 /**
200201 * Constructs an Info object using an already parsed JSON object.
201202 *
202- * @param jsonObject the parsed JSON object.
203+ * @param jsonObject the parsed JSON object.
203204 * @param fileRequestBaseUrl Request base URL
204205 */
205206 Info (JsonObject jsonObject , String fileRequestBaseUrl ) {
0 commit comments