Jump to content

Recommended Posts

Posted

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.

Posted

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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...