Stream file rather than downloading

Advertisement

Guest

Stream file rather than downloading

ES File Explorer on Android has a useful feature. When you connect to a remote server (SFTP, FTP, WebDAV, etc.) and open a file, it serves the file via a built-in web server, which allows the opening application to read only the parts of the file that it needs to. This allows skipping around without media files or extracting a specific file from a large archive without downloading the whole file.

I wish I could do this on Windows as well.

Reply with quote

Advertisement

Advertisement

hele
Guest

Streaming videos

I would like such a feature to stream videos over FTP from my NAS. Entering each video URL into VLS is very inconvenient compared to double clicking in WinSCP.

Reply with quote

Tatigo
Guest

Re: Streaming Files

Same here !!!!!!!!!!!!!!
I would like such a feature to stream videos over WinSCP protocol from my PC. The protocol is "much safer" than "Samba", but much less convenient in terms of viewing video and listening Audio by not able to "streaming"

Reply with quote

dbradley
Guest

I need to be able to pass a stream as well.

I am breaking the news to my boss right now that WINSCP does not support the transfer of streams.

Reply with quote

Advertisement

Pieter
Joined:
Posts:
1

FTPS requirement for download to MemoryStream

Hi,

Can we please have this for FTPS also please I would really want to use this library.

Regards,
Pieter

Reply with quote

Eyl
Joined:
Posts:
4

FTPS GetFile

Hi,
we're really struggling in order to achieve the aforementioned feature.

Our customer changed policy protocol from FTP to FTPS and WinSCP Session object is not able to perform requested queries as before.

Thank you for your kind help.

E

Reply with quote

martin
Site Admin
martin avatar

Re: FTPS GetFile

@Eyl: Sorry, but I do not understand what you refer to. Please start a new thread and post your code, elaborate on "not able to perform" and make sure you include some logs.

Reply with quote

Advertisement

Eyl
Joined:
Posts:
4

Sorry, I was unclear.

I was talking about returning a stream when using GetFile method with FTPS.
We had a code working with FTP and streams, but the customer changed the authentication protocol to FTPS and WinSCP is our only chance to make the app work as usual.

I'm following the aforementioned tracker (https://winscp.net/tracker/1945) and voted there.

Thank you for your work.

Reply with quote

Eyl
Joined:
Posts:
4

Yes, we had legacy code working with FTP and streams.

When customer changed the authentication protocol, we had to look for another dotnet library and yours was the only one explicitly working with FTPS.

Unfortunately streams are currently not supported in WinSCP and our app does run without a volume (serverless architecture) so we cannot use the GetFileToDirectory method.
Moreover, we're trying to refactor as less code as we can as working with legacy code is always a struggle.

Reply with quote

martin
Site Admin
martin avatar

FTPS (and streaming) is supported by the native .NET FtpWebRequest class. Though it has its limitations. For example it does not support TLS/SSL session resume. What can indeed be a showstopper (now or later).

Reply with quote

Advertisement

Alfetta159
Joined:
Posts:
1
Location:
Vacaville, California

Exceptions?

Since the method passes a single file and often uploads are in batches of files, it would be nice to know in the documentation what specific exceptions can be thrown by the PutFile method so we're only catching those during our upload loop and not everything.
foreach (var file in files)
{
    try
    {
        var transferfilename = Approvals.GetTransferName();
        var transfercontent = Approvals.GetTransferContent(file.Content);
        var remotepath = $"{Configuration["SftpInbox"]}/{transferfilename}";
        var byteArray = Encoding.ASCII.GetBytes(transfercontent);
        var stream = new System.IO.MemoryStream(byteArray);
 
        session.PutFile(stream, remotepath, options);
 
        await Approvals.SetTransferNameAsync(file.RowKey, transferfilename, DateTime.UtcNow);
        await Approvals.SetStatusAsync(file.RowKey, CitStatus.Transferred);
    }
    catch (Exception ex)
    {
        //I catch everything here, but I'm only concerned with the exception
        //throw for this single file upload
        await Approvals.SetStatusAsync(file.RowKey, CitStatus.TransferError);
    }
}

Reply with quote

Eyl

martin wrote:

FTPS (and streaming) is supported by the native .NET FtpWebRequest class. Though it has its limitations. For example it does not support TLS/SSL session resume. What can indeed be a showstopper (now or later).
This is exactly our issue.

Reply with quote

Advertisement

You can post new topics in this forum