ZigZig Posted May 13, 2014 Posted May 13, 2014 So many times discussed here: http://forums.unigui.com/index.php?/topic/2139-problem-with-sendstream-with-extensions-not-usual/?hl=mimetable.addmimetype&do=findComment&comment=9499 http://forums.unigui.com/index.php?/topic/3822-file-extensions-registered-with-a-media-type-of-applicationoctet-stream-are-ignored-when-trying-to-send-a-matching-stream-to-the-client/?hl=mimetable.addmimetype http://forums.unigui.com/index.php?/topic/2632-can-not-open-file/?hl=mimetable.addmimetype&do=findComment&comment=12077 http://forums.unigui.com/index.php?/topic/1869-unisessionsendfile-does-not-work-properly/?hl=mimetable.addmimetype&do=findComment&comment=8009 http://forums.unigui.com/index.php?/topic/1511-download-file-issues/?hl=mimetable.addmimetype&do=findComment&comment=5828 http://forums.unigui.com/index.php?/topic/863-files-downoad-trouble/?hl=mimetable.addmimetype&do=findComment&comment=2257 Anyway: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); end; This one also works but is not standard: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('xls', 'Excel'); end; Good luck!
stiaan Posted May 14, 2014 Posted May 14, 2014 Much appreciated! Just a comment, please add this to a demo somewhere for reference
Recommended Posts