Change the directory which ImageMagick performs content transformations in

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
robertscally
Member II

Change the directory which ImageMagick performs content transformations in

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

Re: Change the directory which ImageMagick performs content transformations in

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.

Software Engineer in Alfresco Search Team.
Community Manager
Community Manager

Re: Change the directory which ImageMagick performs content transformations in

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?

robertscally
Member II

Re: Change the directory which ImageMagick performs content transformations in

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. 

Moderator
Moderator

Re: Change the directory which ImageMagick performs content transformations in

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.