$uploader = new Varien_File_Uploader('fileinputname');
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
$uploader->setAllowRenameFiles(false);
$uploader->setFilesDispersion(false);
$path = Mage::getBaseDir('media') .DS. 'foo'.DS ;
if(!is_dir($path))
mkdir($path, 0777, true);
$uploader->save($path, $_FILES['fileinputname']['name']);
Showing posts with label set permission image in magento. Show all posts
Showing posts with label set permission image in magento. Show all posts
Saturday, December 19, 2015
Magento Image upload and set permission in custom module
Subscribe to:
Posts (Atom)