Skip to content

Commit

Permalink
feat: append .dcm of uploaded file
Browse files Browse the repository at this point in the history
- Filename may missing `.dcm` in header's content-disposition
- append it
  • Loading branch information
Chinlinlee committed Apr 30, 2023
1 parent b320f18 commit a76eebf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/dicom-web/controller/STOW-RS/service/dicom-file-saver.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class DicomFileSaver {
/** @type {import("../../../../../models/DICOM/dicom-json-model").DicomJsonModel} */
this.dicomJsonModel = dicomJsonModel;
this.originalFilename = path.basename(this.file.originalFilename);
if (this.originalFilename.indexOf(".dcm") < 0) {
this.originalFilename = this.originalFilename + ".dcm";
}
}

async saveAndGetSaveInfo() {
Expand Down

0 comments on commit a76eebf

Please sign in to comment.