How to reduce uploaded file size?

I am trying to upload files using file upload component in perspective, everything works fine. But I want to reduce the size of the file as they get uploaded. Is there any way that I can do it?

Thank You

Before it is transmitted? No.

After it is received? Yes. You can perform any compression or resizing or transformation you like (and can execute in python or with java libraries) before moving the content to your final storage location.

1 Like

I figured out how to reduce size using OpenCV outside ignition but since ignition doesn’t support OpenCV, its not working.

Well, part of OpenCV can be used in Ignition via a third-party module–Mine, actually. (The cv2 bindings work a bit different in jython vs. python, though, and some features aren’t supported in Java.) However, as noted in the other thread, Java has built-in image manipulation tools, starting with ImageIO. You can use these from jython by importing the necessary classes.