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[!][/!]
![](showImage.tmpl)
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
[!][/!]
![](showImage.tmpl)
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:
Search bug. Search context resolved. (2002)
Shopping Cart ID (1998)
[WebDNA] BBEdit WebDNA Configuration.plist (Language Module) (2013)
2 problems with WebCatalog on Solaris (2001)
Date Bug (1998)
last word listed (2000)
Setting up shop (1997)
WebCat2 beta 11 - new prefs ... (1997)
Another question about credit cards (1997)
WYSIWYG Entry of text fields (2001)
Comments in db? (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Multiple Sendmail Tags on One Page (2008)
Signal Raised Error (Part II) (1997)
Surprise x and y post args (1998)
PIXO support (1997)
Secure Server (1997)
Ampersand (1997)
[Sum] function? (1997)
Problem (1997)