Advertisement
Guest User

Untitled

a guest
May 21st, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--- CFSETTING :: Set Timeout --->
  2. <cfsetting requesttimeout="600" />
  3.  
  4. <!--- Set up the FTP configuration. --->
  5. <cfset objFTPProperties = {
  6. Server = "#ARGUMENTS.FTPHost#",
  7. Username = "#ARGUMENTS.FTPUser#",
  8. Password = "#ARGUMENTS.FTPPass#",
  9. Port = "#ARGUMENTS.FTPPort#",
  10. Secure = true
  11. } />
  12.  
  13.  
  14. <cftry>
  15.  
  16.     <!--- CFFTP :: Open Connection --->
  17.     <cfftp action="open" connection="objConnection" argumentCollection="#objFTPProperties#" timeout="600" />
  18.  
  19.  
  20.     <!--- CFFTP :: "Put" the SQL file to cached connection. --->
  21.     <cfftp
  22.     action="putfile"
  23.     connection="objConnection"
  24.     localfile="#ARGUMENTS.FTPLocalPath#/#ARGUMENTS.FTPLocalFile#"
  25.     remotefile="#ARGUMENTS.FTPDestinationPath#/#ARGUMENTS.FTPLocalFile#"
  26.     transfermode="auto"
  27.     failIfExists="no"
  28.     />
  29.  
  30.  
  31.     <!--- Close the connection. --->
  32.     <cfftp action="close" connection="objConnection" />
  33.  
  34.     <!--- CFCATCH :: If any errors occur, set the Success to No --->
  35.     <cfcatch>
  36.  
  37.         <!--- VAR :: CFSET ::  MyUpload.Success  --->
  38.         <cfset MyUpload.Success  = "No">
  39.  
  40.     </cfcatch>
  41.  
  42. </cftry>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement