Can anyone help me with this sample?
It’s supposed to resize uploaded images on the Javascript canvas before sending it to WiseJ, while preserving the aspect ratio. The use-case is to down-size photos from cameras, that start with a huge image resolution by default, so it uploads to a remote server more quickly. So it makes huge photos smaller before sending it to the server on a limited network connection. I think it’s a very valid use-case for a stock control…
I can get it to compile in WiseJ 2.5 but the images are not resizing when they exceed the threshold, set in ImageSize. It’s supposed to be calling wisej.web.ImgUpload.js but I can’t even see it being hit, nor can I set a breakpoint. I’m not sure what I’m missing (the control was originally made in WiseJ 2.1)
I’m just about ready to give up today… this would really help my demo on Wednesday. Thank you to anyone brave enough to help…
Partially solved.
After wisej 2.1.86, starting in at least 2.1.88, the __createUploadElement function of the Upload control changed so the “addListener” called this._onChange , and not __onUpload.
Pasting the 2.1.86 __createUploadElement() code into the ImageUpload.js platform file, made it so that event reverted back to the 2.1.86 state. It is now resizing again, but we have lost any other new functionality made to the Upload control since 2.1.86
(see attached image)
Next I will see if I can compile the .dll and reference the updated ImageUpload control in my WiseJ 2.5 project.
Can we please get this feature as stock??? 🙂
So I got the source to work in version 2.1.41 using this file (attached), in .NET 4.6. It successfully resized the images on the client.
Then I upgraded to .NET 4.8 and it still worked.
But when I tried to upgrade to WiseJ 2.5 (by right clicking Reference -> Add nuGet package -> WiseJ 2.5.38), the app ran, but didn’t resize the image.
What changes from WiseJ 2.1.41 to WiseJ 2.5.38 that would break this source? And how to get it working again?
Please login first to submit.