Jump to content
uniGUI Discussion Forums
wprins

UniSession.SendStream(), UniSession.SendFile()

Recommended Posts

What is the use of UniSession.SendStream()? In what context might one use it?  Likewise UniSession.SendFile()? 

Share this post


Link to post
Share on other sites

You can send file or stream to client.

 

UniSession.SendFile() is extended version of UniSession.SendStream

Share this post


Link to post
Share on other sites

Yes, it will send data to client which will be received as a file.

 

Actually SendFile() uses SendStreams() internally.

 

Sorry if this is a stupid question, but how would you actually send the file?  In other words, what URL would you use to trigger the download/sending, and in what context?  (I'm already sending files to the client but indirectly via the server module via assigning to the IdResponse.ContentStream.  This works but is slightly awkward as it runs from the "server context" and so the process involves generating a custom URL that is then used in (for example) a link, and which is then recognized by the server module when passed back again.  It would seem I'm missing or misunderstanding something obvious.

Share this post


Link to post
Share on other sites

Please review sendfile demo.

 

Thanks, apologies for not finding this myself.

Share this post


Link to post
Share on other sites

Good night, old post, but my code does not work the sendfile. Compressed document is already in files of type * .RAR, but UniGui says that it did not find path. Can someone help me? on the local network works as shown in the demo.

Share this post


Link to post
Share on other sites

Hello,

 

Good night, old post, but my code does not work the sendfile. Compressed document is already in files of type * .RAR, but UniGui says that it did not find path. Can someone help me? on the local network works as shown in the demo.

 

Can you please specify which edition and build of UniGUI are you using?

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

×