Solved

ColdFusion Document Download - Part 2

Posted on 2010-09-10
9
179 Views
Last Modified: 2013-12-24
Hi,
This is in reference to question : http://www.experts-exchange.com/Software/Server_Software/Web_Servers/ColdFusion/Q_26461687.html

I understand now how to do a secure document download in ColdFusion using CFHeader and CFContent (thanks).

Q:  I'm not sure of the flow:
I have a page of icons/buttons/links that represent different documents that can be downloaded by the user.  When the user clicks one of these icons, what is the flow to download the document and redisplay the page?  Do I have to leave/reload the page - or is that more of a JScript or JQuery question?

Do I just go to another page (via a link), do the download and then CFlocation back to redisplay the original page of doc links?

Thanks in advance,
hefterr
0
Comment
Question by:hefterr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 33647406
You don't have to leave the page.  Link to another page that returns the file as a download. The browser will just display a download/save as prompt. But never leave the current page.

0
 
LVL 1

Author Comment

by:hefterr
ID: 33647708
Hi aqx,
Thanks for the tip.  I'll try it it out but may not get to it until Monday.  So I haven't forgotten about it!!
0
 
LVL 52

Expert Comment

by:_agx_
ID: 33647822
No worries ;-) Enjoy the weekend.
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 1

Author Comment

by:hefterr
ID: 33647823
Hi aqx,
I gave it a quick try.  It WORKS!!!  I think I owe you 250 beers now :)

thanks (again),
hefterr
0
 
LVL 1

Author Comment

by:hefterr
ID: 33647962
Oh - no!  After all this time I just noticed it's :"agx" (not aqx) .  Actualy it seems like it  "_agx_" ?

1,000  appologies.

hefterr
0
 
LVL 52

Expert Comment

by:_agx_
ID: 33648066
lol. Virtual beers are _very_ potent, so I probably shouldn't drink them all at once.

>> 1,000  appologies.

No worries.  I knew what you meant ;-) We'll blame it on the EE font/css.  

0
 
LVL 52

Expert Comment

by:_agx_
ID: 33648090
( Yeah, I'm definitely blaming it on the EE's CSS. Looking at it now, *I* can't even tell it's _agx_ .. and it's my own nickname ! ;-)

0
 
LVL 1

Author Comment

by:hefterr
ID: 33653158
Hi _agx_ (got it right this time),
One last question on the download issue.

I assume the original link woud go to a program that should again verify the credentials of the user before starting the download.  Otherwise you are just basically trading one unsecure link link for another.  In other words, anyone could still use the original link in the HTML to access the file.  It would just invoke a second program that serves it up.  So both programs have to verify the credentials of the user.  The first to provide the link and the 2nd to actually push the file.

thanks again,
hefterr
0
 
LVL 52

Expert Comment

by:_agx_
ID: 33658795
Sorry for the delay...

That all depends on how you're validating the credentials...  I'd assume you're requiring users to login in first via some *.CFM page. If the login is successful, you set a few session variables.  So if you wanted to verify the user was logged in, you'd need to link to a *.cfm script (not *.html page).   The .cfm script would then verify credentials, and redirect the user if they were NOT logged in.
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question