minimalistic-server 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +8 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -729,6 +729,14 @@ export class UploadedFile {
729
729
  return this.#contentType;
730
730
  }
731
731
 
732
+ getExtension() {
733
+ return this.#fileName?.toLowerCase().split('.').at(-1) ?? '';
734
+ }
735
+
736
+ getContentTypeByExtension() {
737
+ return mimeTypes[this.getExtension()] ?? 'application/octet-stream';
738
+ }
739
+
732
740
  getFileName() {
733
741
  return this.#fileName;
734
742
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minimalistic-server",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "engines" : {
5
5
  "npm" : ">=8.6.0",
6
6
  "node" : ">=22.0.0"