dalpiaze Posted July 8, 2012 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
stas Posted July 8, 2012 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
Administrators Farshad Mohajeri Posted July 9, 2012 Administrators Posted July 9, 2012 Hello, Try procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('cfg', 'application/cfg'); end; Exactly. Quote
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.