Re: Protecting Files (how to display vs. present a link to
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62284
interpreted = N
texte = Hello,Stuart Tremain wrote:> If you display the image on a web page you will be able to see the path > of the image. The whole idea of the ReturnRaw method is to stop anyone > from seeing the path.My understanding from what Jesse posted is that the
additional to the apache config would prevent people from directly linking to the file anyway. In my case I want to prevent direct linking, but would like to display the images within a webpage once the user has logged in.> I have come across an ASP method of displaying an image from a > database, does anyone know about this ?> Try as I might I cannot get a path for this image.> > I got this out of a product catalog> title="Catalogue No. 2031VETF" alt="Catalogue No. 2031VETF">Can't help on .asp> > Stuart Tremain> idfk web developments, sydney, australia> > On 20 Jun 2005, at 10:08 AM, eLists wrote:> >> Hello,>>>> Jesse Proudman wrote:>>>>> Here's the code I used:>>> [ReturnRaw binarybody=path/to/file.zip][!]>>> [/!]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!]>>> [/!]Status: 200[unurl][line_ending][/unurl][!]>>> [/!]Content-Type: application/octet-stream[unurl][line_ending][/ >>> unurl][!]>>> [/!]Content-Disposition: attachment; filename="file.zip"[unurl] >>> [line_ending][line_ending][/unurl][!]>>> [/!][/ReturnRaw]>>> You just need to replace path/to/file.zip with the path to the pdf >>> and then filename="file.zip" with the name you want the user to see.>>>>>>> Is there a way to have the image be displayed on the webpage vs. >> having a link to the file to be downloaded?>>>> Thank you!The way I am trying to accomplish this is with the following code:---[ReturnRaw binarybody=[image]][!][/!]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!][/!]Status: 200[unurl][line_ending][/unurl][!][/!]Content-Type: image/jpeg[unurl][line_ending][/unurl][!][/!]Content-Disposition: inline; filename="[image]"[unurl][line_ending][line_ending][/unurl][!][/!]Content-Description: just a small picture[unurl][line_ending][/unurl][!][/!][/ReturnRaw]---Unfortunately this doesn't do the trick. If returnRaw isn't the way to accomplish this, does anyone have an idea on how to, while using a cookie based login, to protect images from being direct linked, while allowing them to be linked and displayed to a user that is properly logged in?Thank youD.>>> Thanks>>> On Jun 10, 2005, at 10:59 AM, Clint Davis wrote:>>>>>>> I read the docs, but I'm not entirely clear on the process. Do you >>>> have some code that you might share?>>>>>>> -- >>> Jesse Proudman>>> Blue Box Group, LLC>>> p. +1.800.613.4305 x801>>> e. jesse@blueboxgrp.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hello,Stuart Tremain wrote:> If you display the image on a web page you will be able to see the path > of the image. The whole idea of the ReturnRaw method is to stop anyone > from seeing the path.My understanding from what Jesse posted is that the additional to the apache config would prevent people from directly linking to the file anyway. In my case I want to prevent direct linking, but would like to display the images within a webpage once the user has logged in.> I have come across an ASP method of displaying an image from a > database, does anyone know about this ?> Try as I might I cannot get a path for this image.> > I got this out of a product catalog> title="Catalogue No. 2031VETF" alt="Catalogue No. 2031VETF">Can't help on .asp> > Stuart Tremain> idfk web developments, sydney, australia> > On 20 Jun 2005, at 10:08 AM, eLists wrote:> >> Hello,>>>> Jesse Proudman wrote:>>>>> Here's the code I used:>>> [ReturnRaw binarybody=path/to/file.zip][!]>>> [/!]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!]>>> [/!]Status: 200[unurl][line_ending][/unurl][!]>>> [/!]Content-Type: application/octet-stream[unurl][line_ending][/ >>> unurl][!]>>> [/!]Content-Disposition: attachment; filename="file.zip"[unurl] >>> [line_ending][line_ending][/unurl][!]>>> [/!][/ReturnRaw]>>> You just need to replace path/to/file.zip with the path to the pdf >>> and then filename="file.zip" with the name you want the user to see.>>>>>>> Is there a way to have the image be displayed on the webpage vs. >> having a link to the file to be downloaded?>>>> Thank you!The way I am trying to accomplish this is with the following code:---[ReturnRaw binarybody=[image]][!][/!]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!][/!]Status: 200[unurl][line_ending][/unurl][!][/!]Content-Type: image/jpeg[unurl][line_ending][/unurl][!][/!]Content-Disposition: inline; filename="[image]"[unurl][line_ending][line_ending][/unurl][!][/!]Content-Description: just a small picture[unurl][line_ending][/unurl][!][/!][/ReturnRaw]---Unfortunately this doesn't do the trick. If returnRaw isn't the way to accomplish this, does anyone have an idea on how to, while using a cookie based login, to protect images from being direct linked, while allowing them to be linked and displayed to a user that is properly logged in?Thank youD.>>> Thanks>>> On Jun 10, 2005, at 10:59 AM, Clint Davis wrote:>>>>>>> I read the docs, but I'm not entirely clear on the process. Do you >>>> have some code that you might share?>>>>>>> -- >>> Jesse Proudman>>> Blue Box Group, LLC>>> p. +1.800.613.4305 x801>>> e. jesse@blueboxgrp.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
eLists
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
SiteEdit NewFile.html ? (1997)
SendMail - sending message to more than one person from (2006)
[WebDNA] Search on a database (2012)
Root Folder problems cont. (1998)
[append] and SSL (1997)
Summing fields (1997)
writefile and texte (1997)
Searching multiple Databases (1997)
Date Search (2004)
[SearchString] problem with [search] context (1997)
Does ".tpl" index with SE's? (2003)
[WebDNA] special chars (2009)
Search Via a drop down menu? (2000)
Cant get my own subtotal (2001)
Expert tech support -- a fast and simple solution (long) ... (2000)
PIXO (1997)
Creating 404 Not Found pages (1999)
WebCat2b15MacPlugin - [protect] (1997)
Speed Admin? (Was FlushDatabases) (1997)
Emailer setup (1997)