Skip to content

Feature Enhancement: Be able to upload multiple streams #1228

Closed

Description

@arman-g

Currently the library supports uploading multiple files using a collection of either the file paths or the FileInfo objects.

It would be really good to be able to upload multiple streams. This is useful when the files come from an external source (e.g. Azure blob storage etc.).

Regards,
AG

Activity

  1. FanDjango commented on Mar 8, 2023

    @FanDjango
    Collaborator

    Could you not wrap this yourself as a multiple incarnation of a FluentFTP (sequential) single stream API call? I suppose this is the way it would be coded into FluentFTP if it were done...

    Useful, I agree, but if you need it now...

  2. arman-g commented on Mar 8, 2023

    @arman-g
    Author

    Hmm, it might be possible, but I am not sure how single stream API call will handle file names.
    As a work around one can zip all the files in one and send it. Or just send each stream in a loop but this is not efficient.

    One of the benefits sending multiple files in one request is that you will not end up with partial success, I guess. Or it all succeeds or all fail.

  3. FanDjango commented on Mar 8, 2023

    @FanDjango
    Collaborator

    but I am not sure how single stream API call will handle file names.

    Yes, I suppose you would be duplicating some stuff already in FluentFTP.

    Or just send each stream in a loop but this is not efficient.

    Wait a moment.

    supports uploading multiple files using a collection

    internally, these are transferred not simultaneously. Rather: One after the other, right? So what's the difference looping them yourself?

  4. arman-g commented on Mar 9, 2023

    @arman-g
    Author

    I see, if internally each file is transferred individually than I can just do it in a loop. I had the impression that it is one transfer and in case of failure the FTP server is responsible for the cleanup.

  5. arman-g commented on Mar 9, 2023

    @arman-g
    Author

    I still think it is worth to provide this feature as an overload of the existing UploadFiles.

  6. FanDjango commented on Mar 21, 2023

    @FanDjango
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址