Skip to content

Commit

Permalink
Include S3 object content type in attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
garyttierney committed Aug 15, 2024
1 parent b7acf8b commit 155c3e4
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
import java.nio.file.AccessDeniedException;
import java.nio.file.NoSuchFileException;
import java.time.Instant;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.*;

/**
* <p>Maps an identifier to an <a href="https://aws.amazon.com/s3/">Amazon
Expand Down Expand Up @@ -326,6 +322,7 @@ private S3ObjectAttributes getObjectAttributes() throws IOException {
.build());
objectAttributes = new S3ObjectAttributes();
objectAttributes.length = response.contentLength();
objectAttributes.contentType = response.contentType();
objectAttributes.lastModified = response.lastModified();
} catch (NoSuchBucketException | NoSuchKeyException e) {
throw new NoSuchFileException(info.toString());
Expand Down

0 comments on commit 155c3e4

Please sign in to comment.