Skip to main content
Known Participant
August 3, 2011
Answered

cffile

  • August 3, 2011
  • 1 reply
  • 664 views

using cf8 on w2k8 and having problems uploading large files using cffile.

session timeouts are 20 mins but if the upload takes longer than this, the session is timing out and the user gets thrown out and has to login again.

any ideas on how to maintain the session while the file is uploading?

This topic has been closed for replies.
Correct answer Adam Cameron.

Hmmm.

On the page displaying the form you could have a "heartbeat" call being made back to the server using JavaScript's setTimeout() functionality (or I'd probably use a JQuery wrapper for same, as you'd also want to be making a xml request there, and JQuery wraps that up nice and generically).  With the timeout being just less than the session timeout.


That said, once you submit the form and that kicks off the next request, I dunno if the JS on the calling page will still run?  I've just never checked.  It should be fairly easy for you to knock a test together though.

--

Adam

1 reply

Adam Cameron.Correct answer
Inspiring
August 4, 2011

Hmmm.

On the page displaying the form you could have a "heartbeat" call being made back to the server using JavaScript's setTimeout() functionality (or I'd probably use a JQuery wrapper for same, as you'd also want to be making a xml request there, and JQuery wraps that up nice and generically).  With the timeout being just less than the session timeout.


That said, once you submit the form and that kicks off the next request, I dunno if the JS on the calling page will still run?  I've just never checked.  It should be fairly easy for you to knock a test together though.

--

Adam

coyloAuthor
Known Participant
August 4, 2011

thanks, i called a .cfm page using javascript after 15 minutes on the form page, and it seems to keep the session ok.

also if i want a progress bar for file uploads what is my best bet?

Inspiring
August 4, 2011

also if i want a progress bar for file uploads what is my best bet?

First: google it and see what you find.

Second: if you don't find anything or get so far with it then get stuck: raise another issue here (well: just in the "ColdFusion" forum, not the "Advanced" one, as this stuff isn't advanced).  Make sure when you post, include what you've done so far, including what code you've tried, and what's going wrong (eg: error messages, unmet expectations, etc).

--
Adam