• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploading with Dropzone not working

#1
[eluser]Lykos22[/eluser]
Hi I'd like some help please. I 'm using dropzone in order to upload multiple files on a Gallery page. The dropzone seems to be set up ok, but when I try to do a test with some images, I drag them inside the dropzone, the progressbar seems to work but the images don't actually upload inside the gallery folder.

Code:
// Controller
public function images() {

  if (!empty($_FILES)) {
   echo '<pre>' . print_r($_FILES, true) . '</pre>'; // $_FILES is empty

   $config['upload_path'] = './uploads/gallery';
   $config['allowed_types'] = 'gif|jpg|png';
   $config['max_size'] = '2048';
   $config['max_width']  = '1024';
   $config['max_height']  = '768';

   $this->load->library('upload', $config);
   $this->upload->do_upload('files[]');
  }

  // load the view
  $this->load->view('admin/gallery/images', $this->data);
}

This is the view:
Code:
<div class="list-images">
// Will display all uploaded images here
</div>

<hr />
&lt;?php echo form_open_multipart('', array('class'=>'dropzone dz-clickable', 'id' => 'my-dropzone')); ?&gt;
<div class="fallback">
    &lt;input name="files[]" type="file" multiple /&gt;
</div>
&lt;?php echo form_close(); ?&gt;

#2
[eluser]Tpojka[/eluser]
What if you put ('controller/method', $attributes) in your form_open_multipart helper function? Asking because first parameter is empty.

#3
[eluser]Lykos22[/eluser]
[quote author="Tpojka" date="1402562093"]What if you put ('controller/method', $attributes) in your form_open_multipart helper function? Asking because first parameter is empty.[/quote]

Same thing. If you leave empty the first parameter is just the same as typing ('controller/method', $attributes). However none of these work.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.