I'm using jquery file upload and want to apply it to my site. So, I unzipped archive and uploaded it's content on server (I'm using php). I can see demo page there, also I've chmoded directory /server/php/files to 777. Files are succesfully uploaded to directory. Also I can see thumbnails of uploaded pictures, when I add them: . But when I use start upload button it uploads file but stops displaying thumbnails and gives me folowing mistake. Has anyone met that mistake? Any suggestions? UPDATE: Here is initialization:
$('#fileupload').fileupload({
// Unment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'server/php/UploadHandler.php',
disableImageResize : false,
process: [
{
action: 'load',
fileTypes: /^image\/(gif|jpeg|png)$/,
maxFileSize: 20000000 // 20MB
},
{
action: 'resize',
maxWidth: 1920,
maxHeight: 1200,
minWidth: 20,
minHeight: 10
},
{
action: 'save'
}
],
});
UPDATE1: I've added attribute data-url to the same uploader to form and to it's action. Now I get mistake: SyntaxError: Unexpected end of input
I'm using jquery file upload and want to apply it to my site. So, I unzipped archive and uploaded it's content on server (I'm using php). I can see demo page there, also I've chmoded directory /server/php/files to 777. Files are succesfully uploaded to directory. Also I can see thumbnails of uploaded pictures, when I add them: . But when I use start upload button it uploads file but stops displaying thumbnails and gives me folowing mistake. Has anyone met that mistake? Any suggestions? UPDATE: Here is initialization:
$('#fileupload').fileupload({
// Unment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'server/php/UploadHandler.php',
disableImageResize : false,
process: [
{
action: 'load',
fileTypes: /^image\/(gif|jpeg|png)$/,
maxFileSize: 20000000 // 20MB
},
{
action: 'resize',
maxWidth: 1920,
maxHeight: 1200,
minWidth: 20,
minHeight: 10
},
{
action: 'save'
}
],
});
UPDATE1: I've added attribute data-url to the same uploader to form and to it's action. Now I get mistake: SyntaxError: Unexpected end of input
disableImageResize
to false
– Nibin
Commented
Jan 23, 2015 at 5:06
@Snoozer right, I also had the same issue, I am using php v7 and after enable the gd
extension its fixed.
you should open your php.ini file and unment this line:
extension=php_gd2.dll
Update for the ment that I've read in the options array:
// Set to 0 to use the GD library to scale and orient images,
// set to 1 to use imagick (if installed, falls back to GD),
// set to 2 to use the ImageMagick convert binary directly:
'image_library' => 1,
I had the same problem, but it was the gd extension or imagick extension was not installed in my php server.
Got same problem on one of Heroku servers and just fixed this by adding
"ext-gd": "*",
to poser.json file require section, hope this will help some one in the future.
sudo apt-get install php7.0-gd
sudo apt-get install php7.1-gd
sudo apt-get install php7.2-gd Can solove the question
Give 777 permissions to folder to which ur uploading files. sudo chmod 777 -R folderpath it solved for me