Take a look at the core file plugin to see how it's handled. If you check out the download script the mimetype is set in the headers there.
I found my way and share ;-)
Table metastring search for elgg application mime type :
- application/force-download
- application/msword
- application/pdf
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
Get the id value
Change the corresponding value for your guid entity in
Table metadata -> value_id
I want to extend your experience:
'application/excel' => 'xls',
'application/msword' => 'doc',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
'application/pdf' => 'pdf',
'application/powerpoint' => 'ppt',
'application/vnd.ms-excel' => 'xls',
'application/vnd.ms-powerpoint' => 'ppt',
'application/vnd.oasis.opendocument.text' => 'open',
'application/x-gzip' => 'arc',
'application/x-rar-compressed' => 'rar',
'application/x-stuffit' => 'archive',
'application/zip' => 'zip',
'image/vnd.djvu' => 'djvu',
'application/x-shockwave-flash' => 'swf','application/ogg' => 'music',
'application/x-gzip' => 'archive',
'application/x-rar-compressed' => 'archive',
'text/directory' => 'vcard',
'text/v-card' => 'vcard',
e.t.c.
Just learn it
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.