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:

Check for OS (2003) READFILE command? (1998) WebCat2 Append problem (B14Macacgi) (1997) ListFields and [name] (1997) Lookup Notfound (1998) Public beta 5 of WebCatalog 4.0 is now available (2000) Pirated WebCat? NOT... (2003) Robert Minor duplicate mail (1997) [WebDNA] WebDNA 7 64bits for OSX (2012) Upgrading old WebCat Database Files (1997) [WebDNA] Multiplication Math Test (2008) Assigning carts (1998) Adding headers to email (1997) WebCat2: multiple currency support (1997) Re:How to Display text in empty fields (1997) WebCatalog for Postcards ? (1997) SSL (1998) SQL, ODBC and MySql (2002) Date search - yes or no (1997) Generating Report Totals (1997)