symfony - how to limit size of an image in symfony2 -


I symphony and I am new to PHP Symphony document reading I had an image successfully uploaded but now I resize an image I am struggling to be limited. I tried using annotation, but it is not working. Can somebody help me out? Thanks in advance. Here's my code.

  / ** * @ Asset \ Image (* minWidth = 100, * maxWidth = 400, * minHeight = 100, * maxHeight = 400, * mimeTypesMessage = "Please upload valid image" * ) * $ / Public $ file; Public function Setfail (Aplodedfail $ file = null) {$ this- & gt; File = $ file; } Public Function getFile () {Return $ this- & gt; File; }  

You can remove the line blank between Dokblok and $ file Are assets?


Comments