Re: [WebDNA] directory protection questions
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100251
interpreted = N
texte = ------=_Part_10635_16308292.1215450670747Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,I've been looking to do something similar. I have been playing around withthe following to download a file called 'tab.png'. The test urls areDirect to imagehttp://www.revolutionaries.ie/testspace/secure/tab.pngWebDNA template forcing downloadhttp://www.revolutionaries.ie/testspace/test.tmplSeems to work on Safari and FireFox. The WebDNA template could then checkfor a cookie etc before executing the download script.- Tomhtaccess in folder to be protectedAuthType BasicAuthName "Restricted Stuff"Options ExecCGIWebDNA template in containing folder[!][/!][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: application/octet-stream[unurl][line_ending][/unurl][!][/!]Content-Disposition: attachment;filename="[exportFile]"[unurl][line_ending][line_ending][/unurl][!][/!][/returnraw]------=_Part_10635_16308292.1215450670747Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,
I've been looking to do something similar. I have been playing around with the following to download a file called 'tab.png'. The test urls are
Direct to image
http://www.revolutionaries.ie/testspace/secure/tab.pngWebDNA template forcing download
http://www.revolutionaries.ie/testspace/test.tmplSeems to work on Safari and FireFox. The WebDNA template could then check for a cookie etc before executing the download script.
- Tom
htaccess in folder to be protected
AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGIWebDNA template in containing folder
[!]<!-- 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: application/octet-stream[unurl][line_ending][/unurl][!]
[/!]Content-Disposition: attachment; filename="[exportFile]"[unurl][line_ending][line_ending][/unurl][!]
[/!][/returnraw]
------=_Part_10635_16308292.1215450670747--
Associated Messages, from the most recent to the oldest:
------=_Part_10635_16308292.1215450670747Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,I've been looking to do something similar. I have been playing around withthe following to download a file called 'tab.png'. The test urls areDirect to imagehttp://www.revolutionaries.ie/testspace/secure/tab.pngWebDNA template forcing downloadhttp://www.revolutionaries.ie/testspace/test.tmplSeems to work on Safari and FireFox. The WebDNA template could then checkfor a cookie etc before executing the download script.- Tomhtaccess in folder to be protectedAuthType BasicAuthName "Restricted Stuff"Options ExecCGIWebDNA template in containing folder
[!][/!]
[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: application/octet-stream
[unurl][line_ending][/unurl]
[!][/!]Content-Disposition: attachment;filename="[exportFile]"
[unurl][line_ending][line_ending][/unurl]
[!][/!][/returnraw]------=_Part_10635_16308292.1215450670747Content-Type: text/html; charset=UTF-8Content-Transfer-Encoding: 7bitContent-Disposition: inlineTerry,
I've been looking to do something similar. I have been playing around with the following to download a file called 'tab.png'. The test urls are
Direct to image
http://www.revolutionaries.ie/testspace/secure/tab.pngWebDNA template forcing download
http://www.revolutionaries.ie/testspace/test.tmplSeems to work on Safari and FireFox. The WebDNA template could then check for a cookie etc before executing the download script.
- Tom
htaccess in folder to be protected
AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGIWebDNA template in containing folder
[!]<!-- 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: application/octet-stream[unurl][line_ending][/unurl][!]
[/!]Content-Disposition: attachment; filename="[exportFile]"[unurl][line_ending][line_ending][/unurl][!]
[/!][/returnraw]
------=_Part_10635_16308292.1215450670747--
"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:
WebCatalog vs WebDNA (2002)
HomePage Caution (1997)
LetterRip and WebCat & more (1998)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
[SendMail] from a form? (1998)
[WebDNA] Searching for multiple bits of data in one field or use (2016)
Help formatting search results w/ table (1997)
Another Excel Problem (2003)
help (2001)
Tech question about web dna actions (1998)
form image (2000)
Creating main- and sub-category search (1997)
Tab Charactor (1997)
[date] tag not working on mac 4.0.1 (2000)
requiring form fields? (2000)
Country & Ship-to address & other fields ? (1997)
Problems with shopping cart (1997)
Problem (1997)
WebCat2b15MacPlugin - showing [math] (1997)
WebCat Performance Issue (2000)