commander Posted January 5, 2020 Share Posted January 5, 2020 Hello. This code is not working (file is not sending) in three different browsers and two computers: UniSession.SendFile(UniServerModule.FilesFolderPath + 'r.rtf'); But this code works perfectly: UniSession.SendFile(UniServerModule.FilesFolderPath + 'r.doc'); Of course both of files are present. Even this option does not work: UniSession.SendFile(UniServerModule.FilesFolderPath + 'r.doc', 'r.rtf'); UniGUI version is 1.90.0.1514. Here is my example. SendFile_RTF.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 5, 2020 Share Posted January 5, 2020 42 minutes ago, commander said: UniSession.SendFile(UniServerModule.FilesFolderPath + 'r.rtf'); Hello, procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('rtf', 'application/rtf', False); end; Quote Link to comment Share on other sites More sharing options...
commander Posted January 5, 2020 Author Share Posted January 5, 2020 3 minutes ago, Sherzod said: Hello, procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('rtf', 'application/rtf', False); end; It works! Thank you! Is it means I can't use random extensions without mime type registration? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 5, 2020 Share Posted January 5, 2020 20 minutes ago, commander said: Is it means I can't use random extensions without mime type registration? "Under normal conditions for security reason only safe file types are allowed to be transferred from the server. You can define as much as mimes needed here." Quote Link to comment Share on other sites More sharing options...
commander Posted January 5, 2020 Author Share Posted January 5, 2020 1 minute ago, Sherzod said: "Under normal conditions for security reason only safe file types are allowed to be transferred from the server. You can define as much as mimes needed here." Thank you again! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 5, 2020 Share Posted January 5, 2020 If you will use HyperServer, you need also configure [custom_mimes]...: http://unigui.com/doc/online_help/installing-and-configuring-hyp.htm Quote Link to comment Share on other sites More sharing options...
Kattes Posted March 19, 2020 Share Posted March 19, 2020 Thank you for this information, which solved my problem with Mime-Types, partially for my Windows 2016 server. Next to this I also needed to adjust supported Mime Types in the IIS Manager (see screen shot below). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.