12-19-2019 08:57 AM
Hi,
Hopefully someone can help me. Is there a way to change the directory in which ImageMagick transforms files?
Currently the directory which is used is the following for example:
/usr/bin/convert /tmp/tomcat7-tomcat7-tmp/Alfresco/ImageMagickContentTransformerWorker_source_2093513773506443120.pdf[0] -auto-orient -resize "100x100>" /tmp/tomcat7-tomcat7-tmp/Alfresco/ImageMagickContentTransformerWorker_target_3052645852772444004.png
Is it possible to change the directory from /tmp/tomcat7-tomcat7-tmp/Alfresco to a directory elsewhere?
Best Regards,
Robert
12-20-2019 05:35 AM
This property is fixed in the source code.
So I guess that you cannot change the path, but overwriting this Java class to set your own.
12-20-2019 05:45 AM
There is a temp directory setting for Content Services and ImageMagick performs transformations there (in a subdirectory). Is there a specific reason you want to modify the transformation location?
12-20-2019 06:50 AM
Thanks for the replies. I appreciate it. The reason I want to change it is because the /tmp folder is also on the root partition and it is causing the root storage to fill up resulting in critical low space issues. I would like to change the location to somewhere which is not on the root partition so ImageMagick can perform the transformations there.
12-20-2019 07:29 AM
The temp path depends on following property set at OS level.
"java.io.tmpdir"
You can change temp folder path by changing the value.
java -Djava.io.tmpdir=/nonrootpath/to/tmpdirSomethingElse
This would solve the problem of having the temp folder on the root partition as you mentioned. Change the path to a non root location.
Please note that if you change the "java.io.tmpdir" path, it would change the path for all the operations which alfresco does in temp location such as imagic magic transformations.
You can not specifically change the path of only image magic transformation as mentioned by Angel.
Explore our Alfresco products with the links below. Use labels to filter content by product module.