I’ve faced a problem… I can not find a good and easy to understand plugin that can upload files to server by clicking and choosing a file or just by draging and droping a file to some area… I know that there are a lot of plugins in web but I couldn’t really make most of them work at my server…
For example, http://fineuploader.com is good but it uses GET request as I understood which is not very good for me and anyway it didn’t work… in controller url which was written in ‘action’ property in js I wrote a script just to understand if something is uploading or not, the console showed that $_FILES array was empty… and ‘upload failed’ was written in the drag and drop box…I don’t know why and what was the problem…
For those of you who understood what I was talking about:
I am using Laravel Framework…
This is what I wrote in js properties:
action:'<?=URL::to_action('test@upload')?>'
This is how my controller looks like:
<?php
class Test_Controller extends Base_Controller {
public $restful = true;
public function post_upload() {
$input = Input::All();
print_r($input);
print_r($_FILES);
if (isset($_GET['file'])) {
echo "good ";
} else {
echo "bad ";
}
}
}
?>
And when I was trying to uploade a file console showed me $input array that contained something like this Array ([file] => 'image.png') and a $_FILES array that was empty Array()… And my last check was returning “good”… If you know how to handle this problem please help!
Or maybe someone knows another good and easy drag and dropping files uploader plugin… I will be very grateful!!!
I’ve found the best drag and drop jquery plugin! It is simple to understand and simple to work with!
Here is the link: jquery-filedrop.