Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Streaming" a file 1

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Nov 21, 2003
4,769
11
38
58
US
I have a web server that has permissions to a folder with files in it (such as .PDF files).

I have a link that will list the files (after the user has logged in and authenticated, and given that they have permissions to these files).

I want to allow them to click on the link, and have it load the file. HOWEVER, it can't just be a file:// link, because the users wouldn't have direct access to the files on the server; the web page controls that access.

SO... I need to have the web server "stream" that file out to the browser (the web service has permissions to read the files, the user doesn't).

I'm sure it's something straightforward, I'm just not sure the term I'm looking for.

Any thoughts? Thanks in advance!


Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
  • Thread starter
  • Moderator
  • #2
Bump....

I thought about perhaps copying the file to a temp file on the server, then linking to THAT... but that isn't quite the way I want to do it.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #3
Bump.... nobody knows anything about this?


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
One way is to use adodb.stream to "stream" the file to the user agent. The drawing idea is that the filepath is actually hidden from the user and it can be a path outside of the site's root thereby protected from casual user and the triggering of the downloading mechanism can be done after the verification of the credential of the user. I can refer you to this previous thread.
If that discussions do not fit exactly you concern at present, you can search the google with the keywords/elements in the thread. That is actually not quite a guarded secret to asp scripters.
 
  • Thread starter
  • Moderator
  • #5
That's more on the money. Thank you!

Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #6
So... update... of sorts.

Turns out that the Windows 2000 server that I'm running doesn't allow for impersonation (that's evidently a 2003/.Net thing).

So, I still need to figure out the permissions for getting the file and sending it out.

Here's the scenario:

Web Server "A" gets a request from a user for a file, which is on FileServer "B". Webserver needs to be able to connect to the file server (evidently without using impersonate), get the file that the user wouldn't have permissions to browse to, then spit it out to the browser.

<Sigh>

Oh, and upgrading to 2003 server isn't an option at the moment.





Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top