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

dimalexan

Ошибка при вызове метода контекста (Open): Произошла исключительная ситуация (WinSCPnet): Значение не может быть неопределенным.
Имя параметра: sessionOptions

//Задаем параметры подключения
//Protocol = Новый COMОбъект("WinSCP.Protocol");
sessionOptions = Новый COMОбъект("WinSCP.SessionOptions"); //Создаем объект SessionOptions
sessionOptions.Protocol = 4;//"Protocol.S3";
//sessionOptions.PortNumber = 443;
sessionOptions.HostName = "storage.yandexcloud.net";
sessionOptions.UserName = "access_key";
sessionOptions.Password = "secret_key";
sessionOptions.RootPath = "Bucket name";
 
session = Новый COMОбъект("WinSCP.Session"); //Создаем объект Session
 
//Подключаемся
session.Open(sessionOptions);
session.PutFiles(ИмяФайлаПолное, "/sbermarket-retailers-begemag/*").Check();
session.Dispose();
martin

Re: S3 amazon

Yes.

Set SessionOptions.Protocol to Protocol.S3.

The easiest is to have the GUI generate the code for you.
https://winscp.net/eng/docs/ui_generateurl#code

While it cannot generate "COM" code, you can have it generate for example C# code. It should be easy then to translate that to COM and your programming language.
dimalexan

S3 amazon

Hi. Is it possible to work with the S3 Amazon cloud through a COM object? If so, what Session options settings need to be set to connect to the cloud?