cancel
Showing results for 
Search instead for 
Did you mean: 

Change the directory which ImageMagick performs content transformations in

robertscally
Champ in-the-making
Champ in-the-making

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

4 REPLIES 4

angelborroy
Community Manager Community Manager
Community Manager

This property is fixed in the source code.

https://github.com/Alfresco/alfresco-repository/blob/master/src/main/java/org/alfresco/repo/content/...

So I guess that you cannot change the path, but overwriting this Java class to set your own.

Hyland Developer Evangelist

jljwoznica
Star Collaborator
Star Collaborator

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?

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. 

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. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)