putObject method
Implementation
Future<bool> putObject({required String key, required Uint8List data, String? contentType, S3Acl? acl}) async {
try {
final headers = <String, String>{};
if (contentType != null) {
headers['content-type'] = contentType;
}
if (acl != null) {
headers['x-amz-acl'] = acl.value;
}
final response = await _makeRequest(method: 'PUT', path: key, body: data, extraHeaders: headers);
return response.statusCode == 200;
} catch (e) {
return false;
}
}