Copy link to clipboard
Copied
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?
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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