Forums / Developer / 'enhancedezbinaryfile' Extension : problem with file url

'enhancedezbinaryfile' Extension : problem with file url

Author Message

Anthony M.

Friday 05 September 2008 2:06:40 am

Hello,

i've installed the 'enhancedezbinaryfile' extension to collect informations of 'File' type, it works correctly :
- send form on the website is OK
- file upload is OK
- send mail is OK
but there is no link in the back to download the uploaded file... and i can't display the crypted file url (this file is stored in var/<siteaccess>/storage/original/collected/application/) in the email

Can you help me please ?
Thanks in advance

Anthony

Steven E. Bailey

Monday 08 September 2008 2:28:04 am

If you modify:

standard/templates/content/datatype/result/info/enhancedezbinaryfile.tpl

like this:

{section show=$:attribute.data_text}
<a href={$:attribute.data_text|parsexml("Filename")|ezroot}>
{$:attribute.data_text|parsexml("OriginalFilename")}</a> {'succesfully uploaded.'|i18n( 'design/standard/content/datatype' )}
{*'File succesfully uploaded.'|i18n( 'design/standard/content/datatype' )*}
{/section}

You'll see the file link in the results.

However, the person uploading the file will also see it on the results page, which may not be desirable unless the extension is restricted. Otherwise, you'll probably want to wrap that with some kind of authentication such as was done with the ez4 version of the datatype - take a look at: http://projects.ez.no/enhancedezbinaryfile

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Anthony M.

Tuesday 09 September 2008 1:43:58 am

thanks a lot, it works fine now !!

Anthony