presignedGetObject method

Future<String> presignedGetObject(
  1. String bucket,
  2. String object, {
  3. int? expires,
  4. Map<String, String>? respHeaders,
  5. DateTime? requestDate,
})

Generate a presigned URL for GET

  • bucketName: name of the bucket
  • objectName: name of the object
  • expires: expiry in seconds (optional, default 7 days)
  • respHeaders: response headers to override (optional)
  • requestDate: A date object, the url will be issued at (optional)

Implementation

Future<String> presignedGetObject(
  String bucket,
  String object, {
  int? expires,
  Map<String, String>? respHeaders,
  DateTime? requestDate,
}) {
  MinioInvalidBucketNameError.check(bucket);
  MinioInvalidObjectNameError.check(object);

  return presignedUrl(
    'GET',
    bucket,
    object,
    expires: expires,
    reqParams: respHeaders,
    requestDate: requestDate,
  );
}