Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Enhancement: Be able to upload multiple streams #1228

Closed
arman-g opened this issue Mar 8, 2023 · 6 comments
Closed

Feature Enhancement: Be able to upload multiple streams #1228

arman-g opened this issue Mar 8, 2023 · 6 comments

Comments

@arman-g
Copy link

arman-g commented Mar 8, 2023

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

@FanDjango
Copy link
Collaborator

FanDjango commented Mar 8, 2023

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

@arman-g
Copy link
Author

arman-g commented Mar 8, 2023

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.

@FanDjango
Copy link
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?

@arman-g
Copy link
Author

arman-g commented Mar 9, 2023

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.

@arman-g
Copy link
Author

arman-g commented Mar 9, 2023

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

@FanDjango
Copy link
Collaborator

I have moved this to the wiki: https://github.com/robinrodricks/FluentFTP/wiki/Future-Plans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants