Re: [WebDNA] Downloadable file protection
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106358
interpreted = N
texte = --20cf303bf980df4807049d7bd75bContent-Type: text/plain; charset=UTF-8Jym,Hi - so the secure files reside in a folder which is protected by thefollowing .htaccess file:AuthType BasicAuthName "Restricted Stuff"Options ExecCGIThen the download template has the following code:[showif [your_authorisation_criteria]=T][text]exportFilePath=path_to_secure_file[/text][text]exportFile=secure_filename[/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][!][/!][/showif]I am using WebDNA on CentOS so there is a WebDNA bug with 'Content-Type' -so to get around this I include the following .htaccess file in thedirectory with the download template:AddType application/octet-stream tmplTake care- Tom--20cf303bf980df4807049d7bd75bContent-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableJym,
Hi - so the secure files reside in a folder which i=s protected by the following .htaccess file:
=AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGI
Then the down=load template has the following code:
[showif [your_authorisation_criteria]=3DT] [text]line_en=ding=3D%0D%0A[/text]
[returnRaw binarybody=3D../[e=xportFilePath][exportFile]]HTTP/1.0 200 OK[unurl][line_ending][/unurl][!]=div>
[/!]Status: 200[unurl][line_ending][/unurl][!]
[/!]Content-Type: application/octet-stream[unurl][line_end=ing][/unurl][!]
[/!]Content-Disposition: attachmen=t; filename=3D"[exportFile]"[unurl][line_ending][line_ending][/un=url][!]
[/!][/returnraw][!]
[/!][/show=if]
I am using WebDNA on CentOS so =there is a WebDNA bug with 'Content-Type' - so to get around this I= include the following .htaccess file in the directory with the download te=mplate:
AddType application/octet-stream tmpl
--20cf303bf980df4807049d7bd75b--
Associated Messages, from the most recent to the oldest:
--20cf303bf980df4807049d7bd75bContent-Type: text/plain; charset=UTF-8Jym,Hi - so the secure files reside in a folder which is protected by thefollowing .htaccess file:AuthType BasicAuthName "Restricted Stuff"Options ExecCGIThen the download template has the following code:[showif [your_authorisation_criteria]=T]
[text]exportFilePath=path_to_secure_file[/text]
[text]exportFile=secure_filename[/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]
[!][/!][/showif]I am using WebDNA on CentOS so there is a WebDNA bug with 'Content-Type' -so to get around this I include the following .htaccess file in thedirectory with the download template:AddType application/octet-stream tmplTake care- Tom--20cf303bf980df4807049d7bd75bContent-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableJym,
Hi - so the secure files reside in a folder which i=s protected by the following .htaccess file:
=AuthType Basic
AuthName "Restricted Stuff"
Options ExecCGI
Then the down=load template has the following code:
[showif [your_authorisation_criteria]=3DT]