Re: [WebDNA] Electronic Delivery (download)

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101563
interpreted = N
texte = ------=_Part_113654_13995407.1228315190679 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mike, Here goes - let me know if any of this is unclear. - Tom 1. htaccess file - goes in folder containing files: AuthType Basic AuthName "Restricted Stuff" Options ExecCGI 2. Secure download template: Pass though the following variables: exportFilePath - webdna path to the file exportFile - name of file to be downloaded Wrap the following in whatever conditions you need to check the user's permissions to download the file, once this bit of code is run it should trigger the browser to download the specified file: [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_113654_13995407.1228315190679 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mike,

Here goes - let me know if any of this is unclear.

- Tom


1. htaccess file - goes in folder containing files:

   AuthType Basic
   AuthName "Restricted Stuff"
   Options ExecCGI


2. Secure download template:

Pass though the following variables:  

   exportFilePath - webdna path to the file
   exportFile - name of file to be downloaded

Wrap the following in whatever conditions you need to check the user's permissions to download the file, once this bit of code is run it should trigger the browser to download the specified file:

   [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_113654_13995407.1228315190679-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Electronic Delivery (download) ("Tom Duke" 2008)
  2. RE: [WebDNA] Electronic Delivery (download) ("Michael A. DeLorenzo" 2008)
  3. Re: [WebDNA] Electronic Delivery (download) ("Tom Duke" 2008)
  4. Re: [WebDNA] Electronic Delivery (download) (Lawrence 2008)
  5. Re: [WebDNA] Electronic Delivery (download) (Terry Wilson 2008)
  6. [WebDNA] Electronic Delivery (download) (Stuart Tremain 2008)
------=_Part_113654_13995407.1228315190679 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mike, Here goes - let me know if any of this is unclear. - Tom 1. htaccess file - goes in folder containing files: AuthType Basic AuthName "Restricted Stuff" Options ExecCGI 2. Secure download template: Pass though the following variables: exportFilePath - webdna path to the file exportFile - name of file to be downloaded Wrap the following in whatever conditions you need to check the user's permissions to download the file, once this bit of code is run it should trigger the browser to download the specified file: [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_113654_13995407.1228315190679 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mike,

Here goes - let me know if any of this is unclear.

- Tom


1. htaccess file - goes in folder containing files:

   AuthType Basic
   AuthName "Restricted Stuff"
   Options ExecCGI


2. Secure download template:

Pass though the following variables:  

   exportFilePath - webdna path to the file
   exportFile - name of file to be downloaded

Wrap the following in whatever conditions you need to check the user's permissions to download the file, once this bit of code is run it should trigger the browser to download the specified file:

   [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_113654_13995407.1228315190679-- "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:

Keep away (1997) Re[2]: Re[2]: Bugs still *not* fixed as promised ... (2000) Hideif / Showif (1998) using showpage and showcart commands (1996) Credit card processing - UK (1997) ShowIf & HideIf Question? (1998) price carry over (1997) Associative lookup style? + bit more (1997) I can help! (1996) [WebDNA] [BULK] which of these tags exist in 7.0 (2011) [CART] (1997) Cyberstudio and WebDNA (1997) WebCat2 - Getting to the browser's username/password data (1997) same product in cart (1997) WebCatalog vs. Cold Fusion (1998) WebDNA on Redhat (2008) Generating Pages (1999) search form problem.. (1997) followup to ws3 vs ws2.1 speed (1998) NT b19 sends extra MIME headers (1997)