views:

149

answers:

1

I apologize if this is not the correct site for this question. There can be arguments to put it on superuser, serverfault, or stackoverflow... I posted it here because source code control is so programming-oriented and it's a code-tweak.

I am able to upload images to mantis issues. I'd like to tweak the mantis code or config to auto-display images (gif, png, jpg).

Has anybody been successful in doing this?

Thanks in advance for your time.

+2  A: 

The behaviour is controlled by the $g_preview_attachments_inline_max_size variable in config_inc.php

According to the Mantis manual:

This feature applies to bmp, jpg, gif, and png files that are attached to bugs. If the file size is smaller than the specified values, the actual image is also previewed with the bugs [...]

Although the manual says the default value is 0 (feature disabled), in Mantis 1.2.0 it is 256KBytes:

$g_preview_attachments_inline_max_size = 256 * 1024;
Adrian
Is there some way to modify this behavior?
hamlin11
I thought it was obvious :)If you want to disable the behaviour you should edit the config_inc.php and set the $g_preview_attachments_inline_max_size to 0However, if you want to enable inline preview for larger images, set the $g_preview_attachments_inline_max_size variable to the desired size (in bytes) e.g. for 512 Kbytes use 512*1024
Adrian