Mahavir Dhruv     Feb,08 2017

Problem to Upload Large Size Files Using CFFTP

Recently I am trying to upload a file and I get error message “An error occurred during the FTP putfile operation”. And code that I use for uploading files that looks like:

<cfftp action="putFile"connection="ftpconnection"failifexists="no"localfile="{localFilePath}"remotefile="{remoteFilePath}"stoponerror="Yes">

The CFFTP tag has one attribute ‘timeout’. It specifies maximum numbers of seconds (time) taken to perform CFFTP action (operation).

Here, I am not specified the ‘timeout’ attribute of CFFTP tag. So it take default value ‘30’ seconds.

And that cause the issue to upload large size files (size in MB) that takes more than 30 seconds to upload. And I make correction to code as:

<cfftp action="putFile"connection="ftpconnection"failifexists="no"localfile="{localFilePath}"remotefile="{remoteFilePath}"timeout="900"stoponerror="Yes">

But this is not full solution, you should have to set ‘requestTimeout ’ value of your page also. Suppose, your page request timeout value is 30 seconds than also you get an error while uploading files.

Using cfsetting tag you can set page request timeout value. Write the following code inside the page to set page request timeout value.

<cfsetting requesttimeout="900">

Finally, it’s allowed to upload large size file.

Hope this helps you.