jQuery-File-Upload icon indicating copy to clipboard operation
jQuery-File-Upload copied to clipboard

resize images while uploading

Open ricca opened this issue 15 years ago • 10 comments

Dear all, I want to optimize the computational time for uploading and resizing pictures: as soon as an image is upload, I want to create a resize image. How can I do it?

Thank you very much for your support!

ricca avatar Jun 17 '11 11:06 ricca

Check out the image_versions option of the example PHP upload handler: https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php#L85

blueimp avatar Jun 17 '11 17:06 blueimp

This document doesn't exist any more. Is there any chance a new link is available as I am having a job getting image resizing working myself. I thought it was as easy as adding max width and height into the parameters, but this doesn't seem to resize:

$(function () { $('#fileupload').fileupload({ dataType: 'json', url: '../fileUpload/server/php/index.php', autoUpload: true, resizeMaxWidth: 600, resizeMaxHeight: 600, maxNumberOfFiles: 8, done: function (e, data) { $.each(data.result, function (index, file) { $('

').text(file.name).appendTo(document.body); }); } }); });

Is there something else I have to invoke? Sorry if I am being stupid...

merrydown avatar Apr 05 '12 23:04 merrydown

I hadn't included the jquery.fileupload-ip.js file, doh! This is solved thanks.

merrydown avatar Apr 06 '12 10:04 merrydown

For a reference to the server-side implementation, I've also updated my link above to the new location of the PHP upload handler class.

blueimp avatar Apr 11 '12 13:04 blueimp

Many thanks for that and for the excellent plugin :)

merrydown avatar Apr 11 '12 14:04 merrydown

That url doesn't exist again. It is showing git hub 404 page. Can you please update it.

grumpydeveloper avatar Jan 18 '13 23:01 grumpydeveloper

URL in my comment above updated again.

blueimp avatar Jan 20 '13 13:01 blueimp

It is still showing 404 page. Not sure what's going on.

grumpydeveloper avatar Jan 20 '13 23:01 grumpydeveloper

Sorry, probably didn't save correctly. Should work now.

blueimp avatar Jan 20 '13 23:01 blueimp

Thanks it worked for me

cpeeyush avatar May 26 '13 12:05 cpeeyush