Skip to content

Commit

Permalink
fix: getMime returns extension if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin committed Oct 8, 2023
1 parent a435387 commit f3fcc28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/aws/aws.s3.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ export class AwsS3Service {
const extension = fileName
.slice(fileName.lastIndexOf(".") + 1, fileName.length)
.toUpperCase();
return lookup(extension) as string;
const fileMime = lookup(extension);
return fileMime || extension;
}

/**
Expand Down

0 comments on commit f3fcc28

Please sign in to comment.