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:

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)