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).
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.