Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- CFSETTING :: Set Timeout --->
- <cfsetting requesttimeout="600" />
- <!--- Set up the FTP configuration. --->
- <cfset objFTPProperties = {
- Server = "#ARGUMENTS.FTPHost#",
- Username = "#ARGUMENTS.FTPUser#",
- Password = "#ARGUMENTS.FTPPass#",
- Port = "#ARGUMENTS.FTPPort#",
- Secure = true
- } />
- <cftry>
- <!--- CFFTP :: Open Connection --->
- <cfftp action="open" connection="objConnection" argumentCollection="#objFTPProperties#" timeout="600" />
- <!--- CFFTP :: "Put" the SQL file to cached connection. --->
- <cfftp
- action="putfile"
- connection="objConnection"
- localfile="#ARGUMENTS.FTPLocalPath#/#ARGUMENTS.FTPLocalFile#"
- remotefile="#ARGUMENTS.FTPDestinationPath#/#ARGUMENTS.FTPLocalFile#"
- transfermode="auto"
- failIfExists="no"
- />
- <!--- Close the connection. --->
- <cfftp action="close" connection="objConnection" />
- <!--- CFCATCH :: If any errors occur, set the Success to No --->
- <cfcatch>
- <!--- VAR :: CFSET :: MyUpload.Success --->
- <cfset MyUpload.Success = "No">
- </cfcatch>
- </cftry>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement