@@ -219,21 +219,20 @@ public static Path convertRemoteFile(String url, String toPathToFile, Param... p
219219
220220 @ SuppressWarnings ("unused" )
221221 public static Path convertRemoteFile (String url , String toPathToFile , String secret , Param ... params ) {
222- return convertRemoteFile (url , toPathToFile , Config .defaults (secret ));
222+ return convertRemoteFile (url , toPathToFile , Config .defaults (secret ), params );
223223 }
224224
225225 @ SuppressWarnings ("unused" )
226226 public static Path convertRemoteFile (String url , String toPathToFile , String token , String apiKey , Param ... params ) {
227- return convertRemoteFile (url , toPathToFile , Config .defaults (token , apiKey ));
227+ return convertRemoteFile (url , toPathToFile , Config .defaults (token , apiKey ), params );
228228 }
229229
230230 public static Path convertRemoteFile (String url , String toPathToFile , Config config , Param ... params ) {
231231 RemoteUploadResponse response = Http .remoteUpload (url , config );
232232 try {
233233 Path toPath = Paths .get (toPathToFile );
234- return convert (response .FileExt , getFileExtension (toPath ), new Param []{
235- new Param ("file" , response .FileId )
236- }, config ).get ().saveFile (toPath ).get ();
234+ Param [] fileParam = new Param []{new Param ("file" , response .FileId )};
235+ return convert (response .FileExt , getFileExtension (toPath ), Param .concat (fileParam , params ), config ).get ().saveFile (toPath ).get ();
237236 } catch (ExecutionException | InterruptedException e ) {
238237 throw new RuntimeException (e );
239238 }
0 commit comments