Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCP with S3

As in the GUI, even in the .NET assembly, the buckets are presented as root-level folders.
See https://winscp.net/eng/docs/guide_amazon_s3#buckets
So listing the root folder will give you bucket names. E.g. in C#:
var buckets = session.ListDirectory("/").Files.Select(_ => _.Name);

That also means that to upload to the bucket, you need to use the bucket name in the target path:
session.PutFileToDirectory(@"C:\local\path\file.txt", "/bucket");
angel@isj.es

WinSCP with S3

Hello, I would like to know how I can get the list of buckets because I can connect with C#, but it doesn't let me upload, telling me "the bucket does not exist." However, with the same data from the program, I can do it perfectly. If you need more information, please let me know, and thank you in advance.