setObjectAcl method

Future<bool> setObjectAcl(
  1. String key,
  2. S3Acl acl
)

Implementation

Future<bool> setObjectAcl(String key, S3Acl acl) async {
  try {
    final response = await _makeRequest(method: 'PUT', path: key, queryParams: {'acl': ''}, extraHeaders: {'x-amz-acl': acl.value});

    return response.statusCode == 200;
  } catch (e) {
    return false;
  }
}