jeudi 4 juin 2015

Why is file uploaded with s3 (java lib) still have content type application/octet-stream

Why does file uploaded with java s3 library have content type application/octet-stream when I access it from web even though I set the contentEncoding to text/html in the code when I upload it ?

ByteArrayInputStream contentsAsStream = new ByteArrayInputStream(contentAsBytes);
ObjectMetadata md = new ObjectMetadata();
md.setContentLength(contentAsBytes.length);
md.setContentEncoding("text/html");
s3.putObject(new PutObjectRequest(ARTIST_BUCKET_NAME, artistId, contentsAsStream, md));




Aucun commentaire:

Enregistrer un commentaire