[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 />
<?php echo form_open_multipart('', array('class'=>'dropzone dz-clickable', 'id' => 'my-dropzone')); ?>
<div class="fallback">
<input name="files[]" type="file" multiple />
</div>
<?php echo form_close(); ?>