I've image name and i would like to save it to my desired folder.
How to achieve this ? Any help would be appreciated.
I am trying to implementing Image Crop function at frontend.
Like User will get option to get crop image option while they upload image.
For that I'm using a example. Check Here
Its working for Core PHP.
I am trying to implementing this code in my controller.
$data = $this->request->getParam('group_image'); list($type, $data) = explode(';', $data); list(, $data) = explode(',', $data); $data = base64_decode($data); echo $imageName = time().'.png'; exit;
$imageName returns Image Name now i want to save this image under Pub/Media.
PS : PHP they have used
IF i use
file_put_contents its working but due to i am doing this in Module MEQP2 standard not allow me to use this function I've to implement this in Magento way.
Question : What is Best Magento way to achieve this ?