EZFile attribute verify mimetype ?

Author Message

H-Works Agency

Monday 14 March 2011 3:54:06 am

Hello,

How is it possible to verify the mime type of uploaded files through an ezbinaryfile (or ezfile) attribute ?

I think there is an ini file to do this but i can't find it.

Thanx in advance for any help !

EZP is Great

Donat Fritschy

Monday 14 March 2011 6:22:29 am

eZ makes it easy for you: the ezbinaryfile object extracts and shows the mime type in the mime_type attribute.

The ini file you are probably looking for is mime.ini

Hope this helps.

Donat Fritschy

http://www.webmanufaktur.ch / http://www.cjw-network.com

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

H-Works Agency

Monday 14 March 2011 6:37:24 am

Ok i see mime.ini content but it doesn't restrict uploaded mime files type.

It only look like a dictionary of available types.

EZP is Great

Marko Žmak

Monday 14 March 2011 11:13:08 am

I'm not 100% sure but I think that by default it's not possible to restrict what mime types can be uploaded in an object's file attribute.

You'll probably have to create a custom edit handler for that.

But hey, this is good idea for an eZP enchanchement...

Note: If you're using multiupload extension you can restrict what types of files can be uploaded under which objects, but I believe this is not what you are looking for.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.