@@ -306,9 +306,8 @@ public Call<ResponseBody> subfolder(
306306 * @since 2022-10-20
307307 */
308308 public Call <ResponseBody > uploadAsset (@ NotNull String filePath , String description ) {
309- RequestBody body = RequestBody .create (MediaType .parse ("multipart/form-data" ), description );
310- MultipartBody .Part partFile = createMultipartBody (filePath , null , null , null , null );
311- return this .service .uploadAsset (this .headers , partFile , body , this .params );
309+ MultipartBody body = createMultipartBody (filePath , null , null , description , null );
310+ return this .service .uploadAsset (this .headers , body , this .params );
312311 }
313312
314313
@@ -327,13 +326,12 @@ public Call<ResponseBody> uploadAsset(@NotNull String filePath, String descripti
327326 * @return Call
328327 */
329328 public Call <ResponseBody > uploadAsset (@ NotNull String filePath , String parentUid , String title , String description , String [] tags ) {
330- RequestBody body = RequestBody .create (Objects .requireNonNull (MediaType .parse ("multipart/form-data" )), description );
331- MultipartBody .Part partFile = createMultipartBody (filePath , parentUid , title , description , tags );
332- return this .service .uploadAsset (this .headers , partFile , body , this .params );
329+ MultipartBody body = createMultipartBody (filePath , parentUid , title , description , tags );
330+ return this .service .uploadAsset (this .headers , body , this .params );
333331 }
334332
335333
336- private MultipartBody . Part createMultipartBody (String filePath , String parentUid , String title , String description , String [] tags ) {
334+ private MultipartBody createMultipartBody (String filePath , String parentUid , String title , String description , String [] tags ) {
337335 MultipartBody .Builder builder = new MultipartBody .Builder ();
338336 builder .setType (MultipartBody .FORM );
339337 return new FileUploader ().createMultipartBody (filePath , parentUid , title , description , tags );
0 commit comments