imageNew locks file if it's not an image

Hello,

I have a quick tip: I had a problem where non image files were locked by tomcat (for a long time) when uploading them to the server. Now I found out it most likely due to a piece of code where I used imageNew and then isImage to get image info to the front-end. This was being called for every file, so also non image files. Currently I added a piece where it uses the extension to check if it’s an image and now it’s not being locked anymore. Still I would say Lucee shouldn’t lock these files like this.

OS: Windows Server 2012 R2 (6.3) 64bit
Java Version: 11.0.6 (AdoptOpenJDK) 64bit
Tomcat Version: Apache Tomcat/9.0.31
Lucee Version: Lucee 5.3.9.141

Can you please mention your image extension version?

Also can you please make check this with the related ticket fixed image extension version 1.0.0.44-SNAPSHOT ([LDEV-3931] - Lucee)

Hey,

We use the “1.2.0.0-SNAPSHOT” version of image extension.

1 Like

Could you please try this with any of the latest image extension versions in 1.0.0 or 1.2.0?

By quick checking, I can confirm the file lock issue was not occurs with imageNew() in the above ticket fixed versions.

https://download.lucee.org/#B737ABC4-D43F-4D91-8E8E973E37C40D1B

1 Like

Hey,

I first removed my image extension check and the problem was still there. I then updated to “1.2.0.3-SNAPSHOT” and did some test again and that also seems to work. So yes updating to the newest version also fixes the lock issue, thanks for helping!

1 Like