Skip to content

Commit

Permalink
Merge pull request #217 from nulib/accession-for-download
Browse files Browse the repository at this point in the history
Use accession number for pdf/zip file download
  • Loading branch information
kdid committed Jun 13, 2024
2 parents a5a90bc + 122fa8c commit d7637c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/src/handlers/get-file-set-download.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ async function getDownloadLink(doc) {
const getObjectParams = {
Bucket: bucket,
Key: key,
ResponseContentDisposition: `attachment; filename=download.${mime.extension(
doc._source.mime_type
)}`,
ResponseContentDisposition: `attachment; filename=${
doc._source.accession_number
}.${mime.extension(doc._source.mime_type)}`,
};

const client = new S3Client(clientParams);
Expand Down

0 comments on commit d7637c7

Please sign in to comment.