feathers-blob
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -77,2 +77,3 @@ 'use strict'; | ||
value: function create(body, params, cb) { | ||
var id = body.id; | ||
var uri = body.uri; | ||
@@ -87,3 +88,3 @@ | ||
var ext = _mimeTypes2.default.extension(contentType); | ||
var id = hash + '.' + ext; | ||
id = id || hash + '.' + ext; | ||
@@ -90,0 +91,0 @@ (0, _util.fromBuffer)(buffer).pipe(this.Model.createWriteStream({ |
{ | ||
"name": "feathers-blob", | ||
"description": "Feathers blob service", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/feathersjs/feathers-blob", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
@@ -29,2 +29,9 @@ # feathers-blob | ||
Optionally, you can specify in the `body` the blob `key` which can be the file | ||
path where you want to store the file, otherwise it would default to | ||
`${hash(content)}.${extension(contentType)}`. | ||
**Tip**: You can use feathers hooks to customize the `id`. You might not want the | ||
client-side to write whereever they want. | ||
returns output 'data' of the form: | ||
@@ -31,0 +38,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11396
146
103
1