Page 1 of 1

How to transform the file before send to the server?

PostPosted: 04 Feb 2019 21:51
by DelphiStudent
JQMFileUpload is very usefull,
am trying to use it to take users profile picture.

when the user press the button "upload", the mobile device ask the source of the file, the camera, the internal files, or a video.

When the user take a picture with his mobile's camera, this file is sent to the server. Usually the photo file is around 4 Mb, and the transmition takes several minutes.

when the file is uploaded, a onComplete event is fired. over that place I can take the file, and process it (process, I mean resize the photo resolution because I don't need that big photo. just something like 300X200).

what's the problem?
I do want to resize the photo file just before send it.
but I don't know if this is posible, I found that the OnSubmit event is fired at the moment of the selection of the file, but, how to manipulate the file,
where is the file before the upload process?
none of the events has a parameter with the selected file.

Thanks

Re: How to transform the file before send to the server?

PostPosted: 06 Feb 2019 10:14
by Alexander Bulei
Hi DelphiStudent,

I've implemented the new property for this purpose - ImageResizer.
Available in last beta release.

Best Regards.

Re: How to transform the file before send to the server?

PostPosted: 07 Feb 2019 03:41
by DelphiStudent
Great. you mean, for version, 4.1.0.153 ?

where can I read how to use it,?
some demo?