i am using this plugin but all works well less one thing. In the example of developper in the final of upload is showed 3 info about the file I want do something like that.
<script type="text/javascript">
$(function() {
$('#userfile').change(function() {
$(this).upload('thumb.php', function(res) {
$(res).insertAfter(this);
}, 'html');
});
});
</script>
</head>
<body>
<input type="file" name="userfile" id="userfile">
<br />
At the moment only the image is uploaded and none message is showed.
The question is, in my php file i test a simple echo that is not showed in .html().
this is the example of the dev
if (move_uploaded_file($_FILES['yourkey']['tmp_name'], '/path/to/save/' . $filename)) {
$data = array('filename' => $filename);
} else {
$data = array('error' => 'Failed to save');
}
header('Content-type: text/html');
echo json_encode($data);
in my case i just test with a echo "success";
what i am doing wrong?
PS: awesome plugin
alert(res)inuploadevent - what is the output ?