File tree Expand file tree Collapse file tree 4 files changed +29
-4
lines changed
Strings/resources.resjson/en-US Expand file tree Collapse file tree 4 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 1111 "loc.input.label.serverUrl": "Server URL",
1212 "loc.input.label.username": "Username",
1313 "loc.input.label.password": "Password",
14+ "loc.input.label.implicitFTPS": "Use implicit FTPS",
1415 "loc.input.label.rootFolder": "Root folder",
1516 "loc.input.help.rootFolder": "The source folder to upload files from.",
1617 "loc.input.label.filePatterns": "File patterns",
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ interface FtpOptions {
2424 cleanContents : boolean ;
2525 preservePaths : boolean ;
2626 trustSSL : boolean ;
27+ implicitFTPS : boolean ;
2728 enableUtf8 : boolean ;
2829 customCmds : string [ ] ;
2930}
@@ -199,14 +200,23 @@ function getFtpOptions(): FtpOptions {
199200 cleanContents : tl . getBoolInput ( "cleanContents" , false ) ,
200201 preservePaths : tl . getBoolInput ( "preservePaths" , true ) ,
201202 trustSSL : tl . getBoolInput ( "trustSSL" , true ) ,
203+ implicitFTPS : tl . getBoolInput ( "implicitFTPS" , false ) ,
202204 enableUtf8 : tl . getBoolInput ( "enableUtf8" , false ) ,
203205 customCmds : tl . getDelimitedInput ( "customCmds" , "\n" , false )
206+
204207 } ;
205208}
206209
207210function getAccessOption ( options : FtpOptions ) : ftp . AccessOptions {
208211 const protocol = options . serverEndpointUrl . protocol ;
209- const secure : boolean = protocol != undefined ? protocol . toLowerCase ( ) === "ftps:" : false ;
212+ let secure : boolean | "implicit" ;
213+ if ( options . implicitFTPS ) {
214+ secure = "implicit" ;
215+ }
216+ else {
217+ secure = ! ! protocol && protocol . toLowerCase ( ) === "ftps:" ;
218+ }
219+
210220 const secureOptions : any = { rejectUnauthorized : ! options . trustSSL } ;
211221
212222 const hostName : string = options . serverEndpointUrl . hostname ! ;
Original file line number Diff line number Diff line change 1818 "demands" : [],
1919 "version" : {
2020 "Major" : 2 ,
21- "Minor" : 211 ,
21+ "Minor" : 228 ,
2222 "Patch" : 0
2323 },
2424 "minimumAgentVersion" : " 2.182.1" ,
7979 "required" : true ,
8080 "visibleRule" : " credsType = inputs"
8181 },
82+ {
83+ "name" : " implicitFTPS" ,
84+ "type" : " boolean" ,
85+ "label" : " Use implicit FTPS" ,
86+ "defaultValue" : " false" ,
87+ "required" : false
88+ },
8289 {
8390 "name" : " rootFolder" ,
8491 "aliases" : [
208215 "UploadSucceedRes" : " FTP upload successful" ,
209216 "UploadFailed" : " Ftp Upload failed"
210217 }
211- }
218+ }
Original file line number Diff line number Diff line change 1818 "demands" : [],
1919 "version" : {
2020 "Major" : 2 ,
21- "Minor" : 211 ,
21+ "Minor" : 228 ,
2222 "Patch" : 0
2323 },
2424 "minimumAgentVersion" : " 2.182.1" ,
7979 "required" : true ,
8080 "visibleRule" : " credsType = inputs"
8181 },
82+ {
83+ "name" : " implicitFTPS" ,
84+ "type" : " boolean" ,
85+ "label" : " ms-resource:loc.input.label.implicitFTPS" ,
86+ "defaultValue" : " false" ,
87+ "required" : false
88+ },
8289 {
8390 "name" : " rootFolder" ,
8491 "aliases" : [
You can’t perform that action at this time.
0 commit comments