putObject method

Future<void> putObject(
  1. String url,
  2. Uint8List imageBytes, {
  3. String? contentType,
})

Implementation

Future<void> putObject(
  String url,
  Uint8List imageBytes, {
  String? contentType,
}) async {
  await _dio.put(
    url,
    data: Stream.fromIterable([imageBytes.toList()]),
    options: Options(
      headers: {
        Headers.contentLengthHeader: imageBytes.length,
        Headers.contentTypeHeader: contentType,
      },
    ),
  );
}