0
My scenario is a app
where I need to open a file in . PDF; do not download, I want to open it direct.
I found several tutorials where they teach Uploads and Downloads, but none that shows how to read direct.
0
My scenario is a app
where I need to open a file in . PDF; do not download, I want to open it direct.
I found several tutorials where they teach Uploads and Downloads, but none that shows how to read direct.
Browser other questions tagged c# ftp
You are not signed in. Login or sign up in order to post.
You have to download the PDF and then open it, FTP is tranferencia, understood?
– novic
If you mean by "download" save in a folder you don’t need, but there is no way you can get the pdf data without "downloading" from ftp, as mentioned by @Virgilionovic, but any example you find, when reading (download) the ftp data, you will already have a
Stream
with the dice, just play thisStream
for a browser for example that will already be possible to view the pdf (need to get the bytes)– Ricardo Pontual
Yes, I understand, I thought you had a more practical and direct way, like accessing a file through a url. ex: ftp://[email protected]/Notasnf/danfes/filename.pdf ... Of course validating access with User and Pass credentials.
– Maurício Sanches
have as it has, but not by FTP
– Rovann Linhalis
take a look at this library, I’ve used it many times for such operations. https://winscp.net/eng/docs/library
– Leandro Angelo
Here you have an example of how to open the PDF. You didn’t specify if it’s Web, MVC, Form, but it might serve as an example. But before doing so you need to store the file that is on FTP in a Stream, as @Ricardopunctual already reported. What have you tried? Got something ready?
– George Wurthmann
@Georgewurthmann I’m using Form, the indication of Ricardo was very good yes, but I could not codify with the use of Stream, so I ended up doing it in the simplest way, downloading the file.pdf to a directory in a fixed folder and opening the file automatically.
– Maurício Sanches