A topic for discussion about the blog post Introducing AWS S3 Support in AWS SDK for Delphi.
What are your thoughts?
A topic for discussion about the blog post Introducing AWS S3 Support in AWS SDK for Delphi.
What are your thoughts?
Good idea, and great job! Thank you.
Is it possible to use another S3 compatible provider (like Backblaze B2 or Wasabi) instead of Amazon, by configuring another URL endpoint?
Finally, thanks to the quality of the code, I found the solution using TAmazonS3Config:
var
Request: IPutObjectRequest;
BucketName, Content, ObjectKey: string;
RegionConfig: TAmazonS3Config;
begin
RegionConfig := TAmazonS3Config.Create;
RegionConfig.ServiceURL := 's3.eu-west-2.wasabisys.com'; // Wasabi S3 service
S3Client := TAmazonS3Client.Create(MyAccessKey, myAccessSecretKey, RegionConfig);
......
Request := TPutObjectRequest.Create;
Request.BucketName := BucketName;
Request.ContentBody := Content;
Request.Key := ObjectKey;
S3Client.PutObject(Request);
....
end;
Thank you @wlandgraf
Hi @Ghazali,
Indeed, it’s possible as you found out. We actually also use Cloudflare R2 with our AWS SDK for Delphi, and it works just fine.
Hi @wlandgraf, I’m doing an implementation at the company I work at using Cloudflare R2 with AWS SDK for Delphi, I managed to upload and delete, but when trying to get the file using TAmazonS3Client.GetObject() I get the error “Invalid RFC822 date format: ”Tue, 08 Jul 2025 21:04:52 GMT“”. The implementation is similar to the one in this, Introducing AWS S3 Support in AWS SDK for Delphi. If you can, I’d like you to explain how you’re getting the files stored in R2
Strange, we use Cloudflare R2 normally with AWS SDK for Delphi. We use GetObject normally.
Have you pulled recent changes?
Yes, I’m using the source code from commit 453fde4. I did some Debugs, and noticed that the problem occurs because apparently the date String is not converted in the TryStrToDateTime of TAWSSDKUtils.TryRfc822ToDateTime. As it’s a simple feature I’m implementing, the dates won’t be important, so I put a fixed date and solved the problem.
If you have more info just let us know. I don’t know what you mean by “date String is not converted”. It’s just a regular Delphi call. But a fix was introduced in a recent commit.