Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cffile

Community Beginner ,
Aug 03, 2011 Aug 03, 2011

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?

TOPICS
Advanced techniques
604
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 04, 2011 Aug 04, 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

...
Translate
LEGEND ,
Aug 04, 2011 Aug 04, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 04, 2011 Aug 04, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2011 Aug 04, 2011
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources