1

I am wondering should i go for old method or something new for image upload check in magento 2?

<?php if(isset($_FILES['image']['name']) and $_FILES['image']['name']!="") ?>

any other solution?

3
  • @RaphaelatDigitalPianism it is not related to uploading the image or file. i am asking for replacement of this code Commented May 5, 2016 at 7:51
  • Check Marius answer basically the upload factory does all the checks for you if I remember right Commented May 5, 2016 at 7:52
  • @RaphaelatDigitalPianism nope i have to go for if else condition to do something. i have to put this before using any library. Commented May 5, 2016 at 7:56

0

Browse other questions tagged or ask your own question.