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:
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)