diff options
Diffstat (limited to 'src/services')
-rw-r--r-- | src/services/index.ts | 2 | ||||
-rw-r--r-- | src/services/uploads.service.ts | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/services/index.ts b/src/services/index.ts index 5ecbc15..2c3430c 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -4,6 +4,7 @@ import Contractors from './contractors.service'; import Waybills from './waybills.service'; import Tranfers from './transfers.service'; import Spreadsheets from './spreadsheets.service'; +import Uploads from './uploads.service'; export default (app: Application): void => { app.configure(Products); @@ -11,6 +12,7 @@ export default (app: Application): void => { app.configure(Waybills); app.configure(Tranfers); app.configure(Spreadsheets); + app.configure(Uploads); app.get('/ping', (req, res) => res.send('pong')); }; 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) +}; |