From 2434c687bbc8f5b42b380a75e48cf1879a508674 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 20 Mar 2021 15:32:30 +0300 Subject: feat: initialize Uploads service --- src/services/uploads.service.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/services/uploads.service.ts (limited to 'src/services/uploads.service.ts') 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) +}; -- cgit v1.2.3