You made a form in adminhtml with upload file but in the controller the $_FILES var is hopelessly empty ?
You probably forgot to add “‘enctype’ => ‘multipart/form-data’,” on your form declaration
example :
file : /app/code/local/Adin/Shipping/Block/Adminhtml/Delivery/Cost/Import/Edit/Form.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | protected function _prepareForm() { $form = new Varien_Data_Form( array ( 'id' => 'edit_form' , 'action' => $this ->getUrl( '*/*/save' , array ( 'id' => $this ->getRequest()->getParam( 'id' ))), 'method' => 'post' , 'enctype' => 'multipart/form-data' , )); $fieldset ->addField( 'fichier' , 'file' , array ( 'label' => $helper ->__( 'Data file' ), 'value' => 'upload' , 'name' => 'fichier' , 'after_element_html' => $helper ->__( '<small>File from carrier</small>' ), 'required' => true, )); |