Downloading files with ColdFusion, too little time?

The client has the ability of the administrator to upload the PDF to his respective directory and indicate it on his website. All this works dandy until the PDF reaches a certain file size, which causes the server to shut down. This will result in an error and the downloaded file will fail.

As mentioned in the header, we use ColdFusion with the team. Are there any java / jquery / flash modules or applications that can solve this problem?

Edit: For clarification, this is a web server timeout, not ColdFusion.

+4
source share
4 answers

You can change the settings in CFadministrator> settings> Request Size Limits

+2
source

On the action page, you can use CFSETTING to increase the timeout, allowing the page to work longer than otherwise permitted:

<cfsetting requesttimeout="{seconds}"> 

Obviously replace {seconds} with the number of seconds you want to allow.

For clarification, this is only if it is a temporary CF synchronization, and not a web server or client (browser).

In addition, most web servers also have a file size limit set for downloads. Make sure this option is set to a reasonable size.

+2
source

You might want to use the cffileupload tag. This is a flash bootloader that can give you the best result.

Alternatively, you can find some way using the Flash download tool to break the download into pieces and reassemble it again to fit the tight limits of your web server.

If you find out, please do not forget to share it here, this is an interesting problem!

0
source

You will need to pay attention to the configuration of iiS> RequestLimits> maxallowedcontentLength as well as the request timeout parameter in the ColdFusion administrator.

If a large file is downloaded that exceeds 30 megabytes, then the default error 404 will be displayed. Suggest you increase the setting (I changed my to 300 MB) to the maximum possible level, and then change the timeout setting in ColdFusion according to the file size and the bandwidth available on your web hosting, with the bandwidth available to your customers (worst case).

You should test the download with the appropriate size file to make sure that it all works, but make sure that the site you are testing on has the equivalent bandwidth for your clients. For instance. test from a site using ADSL.

0
source

Source: https://habr.com/ru/post/1307793/


All Articles