Home Forums .NET libraries Xceed SFTP/FTP for .NET FTP ZipArchive MemoryFile

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21020 |

    Anyone have any ideas on how to FTP a ZipArchive MemoryFile to another server? Is it possible for the FTP component to access the FTP ZipArchive MemoryFile in memory without having to save it to disk first?

    Thanks

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Yemi (had 1362 views)

    Xceed Support
    Member
    Post count: 5658

    Yes, using filesystem, you can copy a ZipArchive MemoryFile into an FtpFile since they derive from AbstractFile class. The archive will be created in memory and will be uploaded using FTP to a specified FTP server.

     

    For instance:

     …

    zipFile = new MemoryFile( @”RAM:\memoryFile.zip” );
    zipArchive = new ZipArchive( zipFile );
    folder2zip = new DiskFolder( folderTozip );
    folder2zip.CopyFilesTo( zipArchive, true, true );

         

    FtpConnection ftpConnection = new FtpConnection( hostname,username, password );
    ftpFile = new FtpFile( ftpConnection, “zipfile.zip” );
    zipFile.CopyTo( ftpFile, true );

    Note that you cannot, from your FTP server, access a MemoryFile located on another machine which is a FTP client of the FTP server.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Mohamed [Xceed] (had 1420 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.