dalpiaze Posted July 8, 2012 Share Posted July 8, 2012 Hello, It seems to be a problem with the function "SendStream" to download files when I want use extensions not usefull, like ".cfg". I use the following code: S := TStringStream.Create('abcdefg'); try UniSession.SendStream(S, 'file.cfg'); finally S.Free; end; If I use the extension default ".txt", then the download sucessfull ocurrs, but when I use an extension like ".cfg", the download doesen't starts. I have tested with Chrome, Internet Explore and FireFox and the same in all. Someone have this problem? Thanks. Quote Link to comment Share on other sites More sharing options...
stas Posted July 8, 2012 Share Posted July 8, 2012 Hello, It seems to be a problem with the function "SendStream" to download files when I want use extensions not usefull, like ".cfg". I use the following code: S := TStringStream.Create('abcdefg'); try UniSession.SendStream(S, 'file.cfg'); finally S.Free; end; If I use the extension default ".txt", then the download sucessfull ocurrs, but when I use an extension like ".cfg", the download doesen't starts. I have tested with Chrome, Internet Explore and FireFox and the same in all. Someone have this problem? Thanks. Hello, Try procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('cfg', 'application/cfg'); end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 9, 2012 Administrators Share Posted July 9, 2012 Hello, Try procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('cfg', 'application/cfg'); end; Exactly. Quote Link to comment Share on other sites More sharing options...
dalpiaze Posted July 10, 2012 Author Share Posted July 10, 2012 OK, solved. Thanks!!! 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.