ImageProcessor API rotate in place

Hi,

I’m coming back here regarding the imageProcessor API, because I’m struggling with using it in a meaningful way.

We already had a discussion a while back here about how to deal with the fact that the output seems to be somehow delayed at times. As a result, the whole process is too protracted and error-prone to be used reliably. The following screenshot illustrates the level of complexity I’ve had to deal with for such a “simple” task (for illustration purposes, not intended to be legible).

image

The classical use-case is that a user snaps a picture from his smartphone camera, and for some reason (whether EXIF or sensor-related) the image is not rotated correctly. Therefore I need to provide a way for users to rotate their image, sometimes by clicking 3 times in a row fairly quickly to rotate it 270°.

The issue is that the ImageProcessor API produces its output in a separate, temporary folder. Because the image is linked to an entity (user or otherwise), I need it to bear the same name as the objectId. Plus, because they may be numerous, I need it to be in a specific subfolder so that there aren’t too many files in the same folder, as recommended here. As a result, the vast majority of the above process is simply used to rename and move the file back to replace the input file. But it fails way too often.

Therefore, my question is : could there not be a parameter in the API in order to replace the input rather than store the output elsewhere ? If that is not possible, at a minimum the possibility to specify the output path, and a parameter to enable overwriting if the file exists (and user rights permit it). It would be of immense help compared to today’s process.

And if I am taking this problem the wrong way, I would gladly take your advice on how to properly replace the input file. Thanks.

Hello @Nicolas_REMY!

I’ve created an internal ticket to add these parameters.
We’ll update you in this thread as soon as the implementation of these features is ready.

Regards,
Alexander

That would be great : I’ve been struggling for a year with uploading and rotating an image !

Hi,

Do you have any news about this ?
My users continue to face unending issues as the rotation + move + rename chained process is unreliable.
Document management is a core feature of my app and I really need this to work.

Thanks.

Hello @Nicolas_REMY

The service is pending testing. We will notify you as soon as the update is available.

Regards,
Inna

Hi @Nicolas_REMY,

Sorry for such a long reply. We have implemented the feature you specified. We have added a new universal parameter.

overwrite_existing - allows you to overwrite an existing file instead of creating a new one. The default value is false.

When you have an opportunity to test it, please let us know if it works as you need it to?

Regards,
Marina