Jump to content
uniGUI Discussion Forums
Tonivi

Execute file in client side

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×