AnsweredAssumed Answered

How do I limit the file types to images that display in Notes & Documents?

Question asked by Mixa.Re Mixa.Re on May 23, 2014
Latest reply on May 28, 2014 by Mixa.Re Mixa.Re
HI Guys

New Function is Display Images in ListView, DetailView & Home Dashlets

Safe Upgrade Change
Modules: Documents & Notes

1) Location: root/custom/include/SugarFields/Fields/File/ListView.tpl
i replace the orginal file than add on foot this code

<br>
<img alt="{sugar_fetch object=$parentFieldArray key=$col}" src="index.php?entryPoint=download&id={$parentFieldArray.ID}&type={$displayParams.module}{$vardef.displayParams.module}" style="width:100px;"/>

2) Location: root/custom/include/SugarFields/Fields/File/DetailView.tpl
i replace the orginal file than add on foot this code
<br><br>
<img src="index.php?entryPoint=download&id={$fields.{{$vardef.fileId}}.value}&type={{$vardef.linkModule}}" style="width:80%;"/>

The result is visible in the attached images

My question is for display only IMAGES
How to limit to show only file_mime_type = image/jpeg, image/gif, image/png

thanks so much
pbr



Outcomes