AWScala
AWScala copied to clipboard
Cannot set object metadata
Hello, my objects are created with the wrong content-type and I'd like to change that. The code runs fine and gives no errors, still the metadata is not changed. Here's my code, note that setAsPublicRead
works and keys are indeed publicly accessible.
case Some(key) =>
key.setAsPublicRead()
key.metadata.setContentType("text/plain")
val meta = key.getObjectMetadata
meta.setContentType("text/plain")
val userMeta = new java.util.HashMap[String, String]
userMeta.put("test-key", "test-value")
meta.setUserMetadata(userMeta)
key.setObjectMetadata(meta)
Issue #89 might be related