How to use feathers-blob - 2 common examples

To help you get started, we’ve selected a few feathers-blob examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phoomparin / FlipED / src / services / upload.js View on Github external
export default function upload() {
  /* eslint no-param-reassign: 0 */
  this.use("upload",
    m.single("uri"),
    (req, res, next) => {
      req.feathers.file = req.file
      next()
    },
    blobService({Model: blobStorage})
  )
  this.service("upload").before({
    create: [
      isRole("guest"),
      hook => {
        if (!hook.data.uri && hook.params.file) {
          const file = hook.params.file
          hook.data = {uri: dauria.getBase64DataURI(file.buffer, file.mimetype)}
        }
        if (!hook.data.uri && hook.data.file) {
          hook.data = {uri: dauria.getBase64DataURI(file.buffer, file.mimetype)}
        }
      }
    ]
  })
}
github telstra / openapi-platform / packages / server / src / createFileService.ts View on Github external
export function createFileService() {
  const blobStorageModel = fsBlobStore(resolve(__dirname, '../files'));
  return blobService({ Model: blobStorageModel });
}

feathers-blob

Feathers blob service

MIT
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis

Popular feathers-blob functions