summaryrefslogtreecommitdiff
path: root/src/services/uploads.service.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-20 15:32:30 +0300
committereug-vs <eug-vs@keemail.me>2021-03-20 15:33:35 +0300
commit2434c687bbc8f5b42b380a75e48cf1879a508674 (patch)
tree76bf1a2399eebb67c6bda52c7f33278cff0ff7cd /src/services/uploads.service.ts
parent8b2f747ae1fb5476da860a5bd90b9b66b61dde99 (diff)
downloadcommercel-api-2434c687bbc8f5b42b380a75e48cf1879a508674.tar.gz
feat: initialize Uploads service
Diffstat (limited to 'src/services/uploads.service.ts')
-rw-r--r--src/services/uploads.service.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/services/uploads.service.ts b/src/services/uploads.service.ts
new file mode 100644
index 0000000..520079f
--- /dev/null
+++ b/src/services/uploads.service.ts
@@ -0,0 +1,13 @@
+import { Application } from '@feathersjs/express';
+import blobService from 'feathers-blob';
+import fs from 'fs-blob-store';
+import Bluebird from 'bluebird';
+import _ from 'lodash';
+
+const blobStorage = fs('./uploads');
+
+const uploads = blobService({ Model: blobStorage });
+
+export default (app: Application): void => {
+ app.use('/uploads', uploads)
+};