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.1215450670747 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry, 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.png WebDNA template forcing download http://www.revolutionaries.ie/testspace/test.tmpl Seems 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 ExecCGI WebDNA 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 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 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry,

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.png

WebDNA template forcing download
http://www.revolutionaries.ie/testspace/test.tmpl

Seems 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 ExecCGI

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

    
  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_10635_16308292.1215450670747 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry, 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.png WebDNA template forcing download http://www.revolutionaries.ie/testspace/test.tmpl Seems 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 ExecCGI WebDNA 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 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 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Terry,

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.png

WebDNA template forcing download
http://www.revolutionaries.ie/testspace/test.tmpl

Seems 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 ExecCGI

WebDNA 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-- "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:

For those of you not on the WebCatalog Beta... (1997) wc 2 pro users - sites, quotes wanted (1997) [redirect] question (2005) [quantity] and quantity[lineindex] (2000) Permission denied? (2004) WebCommerce: Folder organization ? (1997) Re:Has this happened to you? (was:Emailer Chokes on bad address) (1997) I've been thinking (2002) WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997) Capitalize (2003) Locking up with WebCatalog... (1997) Verifying and adding new users (1997) Using Plug-In while running 1.6.1 (1997) PCS Frames (1997) Trigger options (2000) two unique banners on one page (1997) 4.0.2b4 (2000) Multiple Newcarts (1996) New Cart No. on same page (2003) Help! (2000)