Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about MediaBundle #29

Closed
smramirez opened this issue Feb 5, 2014 · 1 comment
Closed

question about MediaBundle #29

smramirez opened this issue Feb 5, 2014 · 1 comment

Comments

@smramirez
Copy link

Hello, first I want to congratulate you for this excellent bundle. I would like to ask you a simple question about MediaBundle, basically how to validate that only can be uploaded files of an specific mime/type and with a maximum size. Since none of the attributes in the used entities has the file type, where I can put this kind of validation or constraints.

@choomz
Copy link
Member

choomz commented Feb 20, 2014

Hi, you should try to use Symfony validators on the base file (your media property). The @Valid() constraint can also helps you.

Hope it helps.

@choomz choomz closed this as completed Feb 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants