Ejemplo n.º 1
0
 /**
  * Uploader block constructor
  */
 public function __construct()
 {
     parent::__construct();
     $type = $this->_getMediaType();
     $allowed = Mage::getSingleton('cms/wysiwyg_images_storage')->getAllowedExtensions($type);
     $this->getUploaderConfig()->setFileParameterName('image')->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload', array('type' => $type)));
     $this->getButtonConfig()->setAttributes(array('accept' => $this->getButtonConfig()->getMimeTypesByExtensions($allowed)));
 }
Ejemplo n.º 2
0
 /**
  * Constructor for uploader block
  */
 public function __construct()
 {
     parent::__construct();
     $this->getUploaderConfig()->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/upload'));
     $this->getUploaderConfig()->setFileParameterName('file');
 }