Skip to content

Commit

Permalink
Merge pull request #1657 from bcgov/feature/ALCS-1915
Browse files Browse the repository at this point in the history
Retain file type when renaming file
  • Loading branch information
dhaselhan authored May 6, 2024
2 parents 57b904a + 755ad1d commit d749934
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class DecisionDocumentUploadDialogComponent implements OnInit {
async onSubmit() {
const file = this.pendingFile;
if (file) {
const renamedFile = new File([file], this.name.value + this.extension ?? file.name);
const renamedFile = new File([file], this.name.value + this.extension ?? file.name, { type: file.type });
this.isSaving = true;
if (this.data.existingDocument) {
await this.decisionService.deleteFile(this.data.decisionUuid, this.data.existingDocument.uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class DecisionDocumentUploadDialogComponent implements OnInit {
async onSubmit() {
const file = this.pendingFile;
if (file) {
const renamedFile = new File([file], this.name.value + this.extension ?? file.name);
const renamedFile = new File([file], this.name.value + this.extension ?? file.name, { type: file.type });
this.isSaving = true;
if (this.data.existingDocument) {
await this.decisionService.deleteFile(this.data.decisionUuid, this.data.existingDocument.uuid);
Expand Down

0 comments on commit d749934

Please sign in to comment.