Re: [WebDNA] directory protection questions

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 100256
interpreted = N
texte = ------=_Part_10888_33498297.1215454827470 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry, Sorry - yea - I misunderstood what you were looking for. The code I posted is to control file downloads, if you want to show the image in html page you could try the code below. All I am doing here is denying public access to the folder, allowing access to WebDNA (the 'Options ExecCGI'), and then proxying the image through WebDNA. I came across this page and thought it might be possible with WebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/). If you're using browser authentication already - then I thought realm protection used this - so all you should have to do it match up your passwords between your login system and your htpassword file and use htaccess protection. - Tom Demo URL http://www.revolutionaries.ie/testspace/test2.tmpl htaccess in folder to be protected AuthType Basic AuthName "Restricted Stuff" Options ExecCGI WebDNA Template showing image [!] [/!] WebDNA Template that calls in image [!] [/!] [text]exportFilePath=secure/[/text] [text]exportFile=tab.png[/text] [text]line_ending=%0D%0A[/text] [returnRaw binarybody=[exportFilePath][exportFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: image/png[unurl][line_ending][/unurl][!] [/!][/returnraw] ------=_Part_10888_33498297.1215454827470 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry,

Sorry - yea - I misunderstood what you were looking for. The code I posted is to control file downloads, if you want to show the image in html page you could try the  code below.

All I am doing here is denying public access to the folder, allowing access to WebDNA (the 'Options ExecCGI'), and then proxying the image through WebDNA.  I came across this page and thought it might be possible with WebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/).

If you're using browser authentication already - then I thought realm protection used this - so all you should have to do it match up your passwords between your login system and your htpassword file and use htaccess protection.

- Tom


Demo URL
http://www.revolutionaries.ie/testspace/test2.tmpl

htaccess in folder to be protected
AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGI

WebDNA Template showing image
[!]<!-- HAS_WEBDNA_TAGS -->
[/!]<img src="showImage.tmpl" />

WebDNA Template that calls in image
[!]<!-- HAS_WEBDNA_TAGS -->
[/!]
[text]exportFilePath=secure/[/text]
[text]exportFile=tab.png[/text]
[text]line_ending=%0D%0A[/text]
[returnRaw binarybody=[exportFilePath][exportFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!]
[/!]Status: 200[unurl][line_ending][/unurl][!]
[/!]Content-Type: image/png[unurl][line_ending][/unurl][!]
[/!][/returnraw]
------=_Part_10888_33498297.1215454827470-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] directory protection questions ("Tom Duke" 2008)
  2. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  3. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  4. Re: [WebDNA] directory protection questions ("Tom Duke" 2008)
  5. RE: [WebDNA] directory protection questions (Terry Wilson 2008)
  6. Re: [WebDNA] directory protection questions ("Tom Duke" 2008)
  7. RE: [WebDNA] directory protection questions (Terry Wilson 2008)
  8. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  9. Re: [WebDNA] directory protection questions ("Tom Duke" 2008)
  10. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  11. Re: [WebDNA] directory protection questions ("Tom Duke" 2008)
  12. Re: [WebDNA] directory protection questions (Bob Minor 2008)
  13. RE: [WebDNA] directory protection questions ("Will Starck" 2008)
  14. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  15. Re: [WebDNA] directory protection questions (Dale Therio 2008)
  16. RE: [WebDNA] directory protection questions (Terry Wilson 2008)
  17. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  18. Re: [WebDNA] directory protection questions (Terry Wilson 2008)
  19. RE: [WebDNA] directory protection questions ("Will Starck" 2008)
  20. Re: [WebDNA] directory protection questions (Colin Sidwell 2008)
  21. Re: [WebDNA] directory protection questions (Frank Nordberg 2008)
  22. Re: [WebDNA] directory protection questions (Stuart Tremain 2008)
  23. [WebDNA] directory protection questions (Terry Wilson 2008)
------=_Part_10888_33498297.1215454827470 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry, Sorry - yea - I misunderstood what you were looking for. The code I posted is to control file downloads, if you want to show the image in html page you could try the code below. All I am doing here is denying public access to the folder, allowing access to WebDNA (the 'Options ExecCGI'), and then proxying the image through WebDNA. I came across this page and thought it might be possible with WebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/). If you're using browser authentication already - then I thought realm protection used this - so all you should have to do it match up your passwords between your login system and your htpassword file and use htaccess protection. - Tom Demo URL http://www.revolutionaries.ie/testspace/test2.tmpl htaccess in folder to be protected AuthType Basic AuthName "Restricted Stuff" Options ExecCGI WebDNA Template showing image [!] [/!] WebDNA Template that calls in image [!] [/!] [text]exportFilePath=secure/[/text] [text]exportFile=tab.png[/text] [text]line_ending=%0D%0A[/text] [returnRaw binarybody=[exportFilePath][exportFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: image/png[unurl][line_ending][/unurl][!] [/!][/returnraw] ------=_Part_10888_33498297.1215454827470 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry,

Sorry - yea - I misunderstood what you were looking for. The code I posted is to control file downloads, if you want to show the image in html page you could try the  code below.

All I am doing here is denying public access to the folder, allowing access to WebDNA (the 'Options ExecCGI'), and then proxying the image through WebDNA.  I came across this page and thought it might be possible with WebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/).

If you're using browser authentication already - then I thought realm protection used this - so all you should have to do it match up your passwords between your login system and your htpassword file and use htaccess protection.

- Tom


Demo URL
http://www.revolutionaries.ie/testspace/test2.tmpl

htaccess in folder to be protected
AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGI

WebDNA Template showing image
[!]<!-- HAS_WEBDNA_TAGS -->
[/!]<img src="showImage.tmpl" />

WebDNA Template that calls in image
[!]<!-- HAS_WEBDNA_TAGS -->
[/!]
[text]exportFilePath=secure/[/text]
[text]exportFile=tab.png[/text]
[text]line_ending=%0D%0A[/text]
[returnRaw binarybody=[exportFilePath][exportFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!]
[/!]Status: 200[unurl][line_ending][/unurl][!]
[/!]Content-Type: image/png[unurl][line_ending][/unurl][!]
[/!][/returnraw]
------=_Part_10888_33498297.1215454827470-- "Tom Duke"

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:

Fun with Dates - revisited (again) (1997) [WebDNA] WebDNA staging server (2008) WCS Newbie question (1997) NT Version on IIS 4.0 (1997) ShowNext (1997) Bug Report, maybe (1997) Emailer help....! (1997) [WebDNA] A new commerce system for v7+ (2011) WML (2000) $append (1998) Still More on EudoraPro Email (1998) Mail Lists (1998) Textarea Breaks (2000) How To question on setting up downloads (1997) WebCat2 Append problem (B14Macacgi) (1997) Not really WebCat (1997) Associative lookup style? + bit more (1997) Re2: frames & carts (1997) Running _every_ page through WebCat ? (1997) [WebDNA] Search 2 databases ??? (2009)