write abstract method

StreamSink<List<int>> write(
  1. String objectName, {
  2. int? length,
  3. ObjectMetadata? metadata,
  4. Acl? acl,
  5. PredefinedAcl? predefinedAcl,
  6. String? contentType,
})

Create a new object.

Create an object named objectName in the bucket.

If an object named objectName already exists this object will be replaced.

If the length of the data to write is known in advance this can be passed as length. This can help to optimize the upload process.

Additional metadata on the object can be passed either through the metadata argument or through the specific named arguments (such as contentType). Values passed through the specific named arguments takes precedence over the values in metadata.

If contentType is not passed the default value of application/octet-stream will be used.

It is possible to at one of the predefined ACLs on the created object using the predefinedAcl argument. If the metadata argument contain a ACL as well, this ACL with be followed by the expansion of predefinedAcl.

Returns a StreamSink where the object content can be written. When The object content has been written the StreamSink completes with an ObjectInfo instance with the information on the object created.

Implementation

StreamSink<List<int>> write(String objectName,
    {int? length,
    ObjectMetadata? metadata,
    Acl? acl,
    PredefinedAcl? predefinedAcl,
    String? contentType});