setKeyStartsWith method

void setKeyStartsWith(
  1. String prefix
)

set object name prefix, i.e policy allows any keys with this prefix

Implementation

void setKeyStartsWith(String prefix) {
  MinioInvalidPrefixError.check(prefix);
  policy['conditions'].push(['starts-with', r'$key', prefix]);
  formData['key'] = prefix;
}