nach dem Update auf neue Version 1.9.3 . Der Uploader funktioniert nicht mehr. unten Fehler angegeben. Ich aktualisiere meinen Code, aber immer noch der gleiche.
var uploader = neu
Uploader ({"uploaderConfig": {"chunkSize": 1073741824, "withCrede ...
Unten ist mein Code
class Spacename_Modulename_Block_Adminhtml_Modulename_Edit_Tab_Images extends Mage_Adminhtml_Block_Widget {
protected $_uploaderType = 'uploader/multiple';
protected function _prepareForm() {
$data = $this->getRequest()->getPost();
$form = new Varien_Data_Form();
$form->setValues($data);
$this->setForm($form);
return parent::_prepareForm();
}
protected function _prepareLayout() {
$this->setChild('uploader', $this->getLayout()->createBlock($this->_uploaderType)
);
$this->getUploader()->getUploaderConfig()
->setFileParameterName('image')
->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/image'));
$browseConfig = $this->getUploader()->getButtonConfig();
$browseConfig
->setAttributes(array(
'accept' => $browseConfig->getMimeTypesByExtensions('gif, png, jpeg, jpg')
));
return parent::_prepareLayout();
}
}
js Code
<script type="text/javascript">
//<![CDATA[
var <?php echo $_block->getJsObjectName(); ?> = new Product.Gallery('<?php echo $_block->getHtmlId() ?>', <?php echo $_block->getImageTypesJson() ?>);
//]]>
</script>