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.1215454827470Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,Sorry - yea - I misunderstood what you were looking for. The code I postedis to control file downloads, if you want to show the image in html page youcould try the code below.All I am doing here is denying public access to the folder, allowing accessto WebDNA (the 'Options ExecCGI'), and then proxying the image throughWebDNA. I came across this page and thought it might be possible withWebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/).If you're using browser authentication already - then I thought realmprotection used this - so all you should have to do it match up yourpasswords between your login system and your htpassword file and usehtaccess protection.- TomDemo URLhttp://www.revolutionaries.ie/testspace/test2.tmplhtaccess in folder to be protectedAuthType BasicAuthName "Restricted Stuff"Options ExecCGIWebDNA 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 200OK[unurl][line_ending][/unurl][!][/!]Status: 200[unurl][line_ending][/unurl][!][/!]Content-Type: image/png[unurl][line_ending][/unurl][!][/!][/returnraw]------=_Part_10888_33498297.1215454827470Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,
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.tmplhtaccess in folder to be protectedAuthType Basic
AuthName "Restricted Stuff"
Options ExecCGIWebDNA 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:
------=_Part_10888_33498297.1215454827470Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,Sorry - yea - I misunderstood what you were looking for. The code I postedis to control file downloads, if you want to show the image in html page youcould try the code below.All I am doing here is denying public access to the folder, allowing accessto WebDNA (the 'Options ExecCGI'), and then proxying the image throughWebDNA. I came across this page and thought it might be possible withWebDNA (http://www.lunawebs.com/blog/2008/02/22/secure-file-download/).If you're using browser authentication already - then I thought realmprotection used this - so all you should have to do it match up yourpasswords between your login system and your htpassword file and usehtaccess protection.- TomDemo URLhttp://www.revolutionaries.ie/testspace/test2.tmplhtaccess in folder to be protectedAuthType BasicAuthName "Restricted Stuff"Options ExecCGIWebDNA 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 200OK
[unurl][line_ending][/unurl]
[!][/!]Status: 200
[unurl][line_ending][/unurl]
[!][/!]Content-Type: image/png
[unurl][line_ending][/unurl]
[!][/!][/returnraw]------=_Part_10888_33498297.1215454827470Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,
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.tmplhtaccess in folder to be protectedAuthType Basic
AuthName "Restricted Stuff"
Options ExecCGIWebDNA 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][!]
[/!]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)