Jump to content

Execute file in client side


Tonivi

Recommended Posts

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

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

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

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

  • 6 years later...
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...