@taleswords/common 1.0.21 → 1.0.22
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.
- package/build/constants/globals.d.ts +1 -0
- package/build/constants/globals.d.ts.map +1 -1
- package/build/constants/globals.js +1 -1
- package/build/constants/globals.js.map +1 -1
- package/build/middlewares/uploader.d.ts.map +1 -1
- package/build/middlewares/uploader.js +2 -1
- package/build/middlewares/uploader.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../src/constants/globals.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACjB"}
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../src/constants/globals.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,UAAU,YAAY,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const UPLOAD_DIR = 'upload/';
|
|
2
2
|
//# sourceMappingURL=globals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../../src/constants/globals.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../../src/constants/globals.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../src/middlewares/uploader.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAA0B,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../src/middlewares/uploader.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAA0B,MAAM,SAAS,CAAA;AAG9D,MAAM,WAAW,yBAAyB;IACtC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,qBAAa,QAAQ;IAEE,SAAS,EAAE,MAAM;gBAAjB,SAAS,GAAE,MAAoB;IAE3C,UAAU,GAAI,QAAQ,KAAK,CAAC,MAAM,CAAC,MAC9B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,kBAAkB,UAa1E;IAEM,OAAO,uBAOZ;IAEF,mBAAmB,CAAC,OAAO,CAAC,EAAE,yBAAyB;IAOvD,gBAAgB,CAAC,OAAO,CAAC,EAAE,yBAAyB;CAMvD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import multer, {} from 'multer';
|
|
2
|
+
import { UPLOAD_DIR } from '../constants/globals.js';
|
|
2
3
|
export class Uploader {
|
|
3
4
|
uploadDir;
|
|
4
|
-
constructor(uploadDir =
|
|
5
|
+
constructor(uploadDir = UPLOAD_DIR) {
|
|
5
6
|
this.uploadDir = uploadDir;
|
|
6
7
|
}
|
|
7
8
|
fileFilter = (types) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploader.js","sourceRoot":"","sources":["../../src/middlewares/uploader.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAA2B,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"uploader.js","sourceRoot":"","sources":["../../src/middlewares/uploader.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAA2B,M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