fPutObject method
Implementation
Future<String> fPutObject(
String bucket,
String object,
String filePath, [
Map<String, String>? metadata,
]) async {
MinioInvalidBucketNameError.check(bucket);
MinioInvalidObjectNameError.check(object);
var meta = metadata ?? {};
meta = insertContentType(meta, filePath);
meta = prependXAMZMeta(meta);
final file = File(filePath);
final stat = file.statSync();
if (stat.size > maxObjectSize) {
throw MinioError(
'$filePath size : ${stat.size}, max allowed size : 5TB',
);
}
return putObject(
bucket,
object,
file.openRead().cast<Uint8List>(),
size: stat.size,
metadata: meta,
);
}