Please help me make when I press on paper clip to download the attachment instead of opening in the browser
Announcement
Collapse
No announcement yet.
Make attachment download instead of view in browser (.txt or .xml)
Collapse
X
-
- Likes 1
Comment
-
Changing the source code is a bad practice. Any update overwrites the made changes.
In this case, the correct way is to create (or edit) the file Custom\Espo\Custom\Resources\metadata\app\file.jso n and define in it the files that should be shown inline. By default, the list is:
``` "inlineMimeTypeList": [
"application/pdf",
"audio/wav",
"audio/mpeg",
"audio/ogg",
"audio/webm",
"video/mpeg",
"video/mp4",
"video/ogg",
"video/webm",
"image/jpeg",
"image/png",
"image/gif",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.ms-word",
"application/vnd.ms-excel",
"application/vnd.oasis.opendocument.text",
"application/vnd.oasis.opendocument.spreadsheet",
"application/msword",
"application/msexcel"
]
```
You just need to remove "text/plain" and others that need to be downloaded.
Comment