Tonivi Posted November 12, 2017 Share Posted November 12, 2017 Hi Is it possible to execute a .exe file in client side, or if not, how can I send a file from server to client side? Thanks Link to comment Share on other sites More sharing options...
mika Posted November 12, 2017 Share Posted November 12, 2017 You can send file to client by using UniSession.SendFile(...); However, you *cannot* execute anything on the client side automatically. That would destroy the whole internet and quite possibly cause a rip in space time continuum. Link to comment Share on other sites More sharing options...
Tonivi Posted November 12, 2017 Author Share Posted November 12, 2017 ok, I send a file as sendfile to the cache directory of the server, I can open if it's a word, excel, pdf, txt, but I cann't open if it's a .msg. is there any way to open theses files. Link to comment Share on other sites More sharing options...
mika Posted November 13, 2017 Share Posted November 13, 2017 I don't understand your problem? Can you clarify? If you use UniSession.SendFile(...) to send file from server to client, whether client can open file you sent, depends on software installed on clients machine. That's not something that can be controlled on server side. Link to comment Share on other sites More sharing options...
Tonivi Posted November 13, 2017 Author Share Posted November 13, 2017 I run the sendfile command, UniSession.SendFile (vOrigin, vTarget); The file is copied from the server path to the cache route of this session, ignoring the destination route, and asks me on the client side, if I want to save and then open. The sendfile doesn't send anything to the local disk. Also, in all the files that I pass, it works well for me, except for those that have the extension .msg (outlook). My question is why Can I not open these files (.msg). And the other question is, can I send these files to a local disk? Link to comment Share on other sites More sharing options...
Sherzod Posted November 13, 2017 Share Posted November 13, 2017 Hi, You need to add mimetype to MimeTable: UniServerModule -> OnCreate: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('msg', 'application/vnd.ms-outlook', False); end; Best regards, Link to comment Share on other sites More sharing options...
Tonivi Posted November 13, 2017 Author Share Posted November 13, 2017 It Works Perfect Thanks Link to comment Share on other sites More sharing options...
ugur dogan Posted February 24 Share Posted February 24 On 11/13/2017 at 12:24 PM, Sherzod said: Hi, You need to add mimetype to MimeTable: UniServerModule -> OnCreate: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('msg', 'application/vnd.ms-outlook', False); end; Best regards, Hi @Sherzod While I can download the excel file in the web project without any problem, when I try with edge on the phone, "You may close this window after the file is downloaded!" This message appears in a new tab and after waiting for a long time, it goes to the sencha site. When I look at this Sencha example, I see that it downloads smoothly on mobile. https://fiddle.sencha.com/#view/editor&fiddle/1oup I tried different browsers on my iPhone phone. gridSonuc.Exporter.FileName := 'Liste ' + FormatDateTime('yyyymmdd-hhnnss', now); gridSonuc.Exporter.Title := 'Liste'; gridSonuc.Exporter.ExportGrid; Link to comment Share on other sites More sharing options...
Sherzod Posted February 24 Share Posted February 24 Hi, We will check. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now