R2 with S3 API - uploadFromBytes Xhht

I am developping in Flutter.

I look for a dependency that would handle Cloudflare R2 but the one that exists only manay Image, Stream, …
I backed on the S3 API.
I tried minio that works well for everything but putObject from the Web (bytes).
It systematically ends with a “XMLHttpRequest error.” no matter how I cast the original xFile.

Any idea ?