thrace-project / media-bundle

The `ThraceMediaBundle` handles file, video, audio and image upload plus some image manipulations.
MIT License
11 stars 10 forks source link

Image Upload Configurations Issue. #7

Open barankhan opened 9 years ago

barankhan commented 9 years ago

https://github.com/thrace-project/media-bundle/blob/master/Resources/doc/image_upload.md On the above URL I am reading the following: Important: Configs 'minWidth', 'minHeight', 'maxSize', 'extensions' are required. But when system is asking for the identifier. In the code: thrace-project/media-bundle/Thrace/MediaBundle/Form/Type/ImageUploadType.php on line number 156 $requiredConfigs = array('minWidth', 'minHeight', 'extensions', 'identifier');

Please let me know what is identifier? So I can configure it.

barankhan commented 9 years ago

I was fixed by adding parameter in

parameters:
    plupload_options:
          max_upload_size: 4000000
          extensions: 'jpeg,jpg,png'
          minWidth: 100
          minHeight: 100

->add('coverMedia', 'thrace_image_upload', array( 'label' => 'Cover Photo', 'data_class' => 'Beusoft\MediaBundle\Entity\Image', 'configs' => array( 'minWidth' => 300, 'minHeight' => 100, 'extensions' => 'jpeg,jpg,gif,png', 'max_upload_size' => '4M', 'identifier' => "plupload_options", 'filter' => 'my_thumb', 'div_class' => 'col-lg-9', 'div_class' => 'col-lg-12' //fix mopa-bootsrap-bundle ),