@@ -147,6 +147,8 @@ public class SendSafely {
147147
148148 protected double version = 0.3 ;
149149
150+ private boolean ec2Proxy = false ;
151+
150152 /**
151153 * @description Constructor to create a new SendSafely object.
152154 * @param host The hostname you use to access SendSafely. Should be https://companyname.sendsafely.com or https://www.sendsafely.com
@@ -216,6 +218,10 @@ public SendSafely(String host) {
216218 this (host , (ConnectionManager )null , (CredentialsManager )null );
217219 }
218220
221+ public void setEc2Proxy (boolean isProxy ) {
222+ this .ec2Proxy = isProxy ;
223+ }
224+
219225 /**
220226 * @description Add Contact Group as a recipient on a package.
221227 * @param packageId The unique package id of the package for the add the Contact Group operation.
@@ -435,7 +441,7 @@ public void deletePackage(String packageId) throws DeletePackageException
435441 */
436442 public java .io .File downloadFile (String packageId , String fileId , String keyCode ) throws DownloadFileException , PasswordRequiredException
437443 {
438- return downloadFile (packageId , fileId , keyCode , null , ( String ) null );
444+ return downloadFile (packageId , fileId , keyCode , new DefaultProgress () );
439445 }
440446
441447 /**
@@ -452,7 +458,7 @@ public java.io.File downloadFile(String packageId, String fileId, String keyCode
452458 public java .io .File downloadFile (String packageId , String fileId , String keyCode , ProgressInterface progress ) throws DownloadFileException , PasswordRequiredException
453459 {
454460 DownloadAndDecryptFileHandler handler = new DownloadAndDecryptFileHandler (uploadManager );
455- return handler .makeRequest (packageId , null , fileId , keyCode , progress , null );
461+ return handler .makeRequestS3 (packageId , null , fileId , keyCode , progress , null , ec2Proxy );
456462 }
457463
458464 /**
@@ -485,7 +491,6 @@ public java.io.File downloadFile(String packageId, String fileId, String keyCode
485491 return handler .makeRequest (packageId , null , fileId , keyCode , progress , password );
486492 }
487493
488-
489494 /**
490495 * @description Downloads a file from the server and decrypts it.
491496 * @param packageId The unique package id of the package for the file download operation.
@@ -499,7 +504,8 @@ public java.io.File downloadFile(String packageId, String fileId, String keyCode
499504 */
500505 public java .io .File downloadFile (String packageId , String fileId , String keyCode , String password ) throws DownloadFileException , PasswordRequiredException
501506 {
502- return downloadFile (packageId , fileId , keyCode , null , password );
507+ DownloadAndDecryptFileHandler handler = new DownloadAndDecryptFileHandler (uploadManager );
508+ return handler .makeRequest (packageId , null , fileId , keyCode , null , password );
503509 }
504510
505511 /**
@@ -531,7 +537,7 @@ public java.io.File downloadFileFromDirectory(String packageId, String directory
531537 */
532538 public java .io .File downloadFileFromDirectory (String packageId , String directoryId , String fileId , String keyCode , ProgressInterface progress ) throws DownloadFileException , PasswordRequiredException {
533539 DownloadAndDecryptFileHandler handler = new DownloadAndDecryptFileHandler (uploadManager );
534- return handler .makeRequest (packageId , directoryId , fileId , keyCode , progress );
540+ return handler .makeRequestS3 (packageId , directoryId , fileId , keyCode , progress , ( String ) null , ec2Proxy );
535541 }
536542
537543 /**
0 commit comments