Jump to content

UniSession.SendStream


bbm

Recommended Posts

Yes, I have seen the demo, but when I send the stream (UniSession.SendStream), how can I use any URL?

In the demo there are some PDF documents in the files directory.

I think the sent file is stored in the user directory of the current user.

 

Best regards

Link to comment
Share on other sites

Yes, this is my problem.

The idea was not to see the popup for opening or saving the file.

Instead of the popup I wanted to stream the PDF directly to the UniPDFFrame.

Is there any possibility?

 

Best regards

Link to comment
Share on other sites

Hi,

I generated pdf file, send to client and show like this:

 
UrlFilePath := 'SavePath' {Fisical path on server} + '\' + FileName;
//make windows path to URL path
UrlFilePath := StringReplace (UniSession.URL + UrlFilePath,'\','/',[rfReplaceAll]);
 
//If is Desktop platform
If UniApplication.UniPlatform = [upDesktop] then begin
      UniSession.AddJS('var myWindow = window.open(''' + UrlFilePath + '.pdf''', ''_blank'');'
                                    + 'myWindow.print();'
                                    );
end
else  begin
      UniSession.AddJS('var myWindow = window.open(''' + UrlFilePath + '.pdf''', ''_blank'');'
                                    );
end;
 
Hope this help.
Link to comment
Share on other sites

  • 5 months later...

Hi,

 

is there any restriction on the name extension of a filename?

I wanted to send a file with the extension '.cli', but unfortunately without success.

 

Best regards

 

Link to comment
Share on other sites

  • 4 years later...

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...