Currently, with S3 uploads using STS credentials, if the upload takes longer than the session token expiration, the upload fails.
I've implemented a simple example change here to demonstrate how this credential renewal could be achieved using a callback, along with a minor adjustment to retrieve credentials via a method rather than directly accessing accessKey and secretKey on the Minio class: https://github.com/JacoFaberSA/minio-dart/tree/credential-renewal-feature
However, this solution seems to benefit only S3 uploads as far as I can see.