update method

Future<BucketFile> update({
  1. required String bucket,
  2. required String key,
  3. String? description,
  4. List<String>? tags,
})

Updates the metadata (description, tags) of a file in a storage bucket.

Implementation

Future<BucketFile> update({
  required String bucket,
  required String key,
  String? description,
  List<String>? tags,
}) => http
    .request('${_config.serviceUrl}/data/$bucket/$key')
    .use(http.context(_config))
    .use(http.access())
    .put({'description': description, 'tags': tags})
    .json((json) => BucketFile.fromJson(json));