You could download the image using Zend's http client and then apply
validators to it without using the Transfer object.
If the image is not valid you can delete it and display an error.
However, you will have to think how to deal with too big files and invalid
URLs.
El 26/5/2015 4:59, "cmple" <[email protected]> escribió:

> Hi,
>
> How can I upload images to the server from an external URL (e.g.:
>
> https://alphalister.com/files/cmple_35e2/i/m/e0d215f9a9f0399f2f0dff192ed0ffba.jpg
> )
> and validate it using the existing Validators (e.g.: "ImageSize")
>
> I've been using Zend\File\Transfer\Transfer for uploading images to the
> server (user->server).
> With the Transfer class I can easily set image Validators...
> for example:
> $transfer->addValidators(array(
>         array('ImageSize', true,
>                                 array(
>                                         'minwidth' => 100,
>                                         'minheight' => 100,
>                                         'maxwidth' => 5000,
>                                         'maxheight' => 500,
>                                 ),
>                         ),
> ));
>
>
> Thank You!
> Roman.
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/ZF2-Import-and-validate-external-pictures-from-URLs-tp4662542.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to