feathers-blob
Advanced tools
Comparing version 2.5.0 to 2.6.0
# Changelog | ||
## [v2.5.0](https://github.com/feathersjs-ecosystem/feathers-blob/tree/v2.5.0) (2021-04-25) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-blob/compare/v2.4.0...v2.5.0) | ||
**Closed issues:** | ||
- Could we have the contentType in the create result ? [\#83](https://github.com/feathersjs-ecosystem/feathers-blob/issues/83) | ||
**Merged pull requests:** | ||
- Add contentType in get / create response [\#85](https://github.com/feathersjs-ecosystem/feathers-blob/pull/85) ([mdartic](https://github.com/mdartic)) | ||
- Move CI to GitHub action [\#84](https://github.com/feathersjs-ecosystem/feathers-blob/pull/84) ([daffl](https://github.com/daffl)) | ||
## [v2.4.0](https://github.com/feathersjs-ecosystem/feathers-blob/tree/v2.4.0) (2021-04-15) | ||
@@ -4,0 +17,0 @@ |
@@ -41,2 +41,7 @@ const { extname } = require('path'); | ||
get (id, params = {}) { | ||
const s3Params = { | ||
...params.s3, | ||
VersionId: (params.query && params.query.VersionId) ? params.query.VersionId : undefined | ||
}; | ||
const ext = extname(id); | ||
@@ -54,3 +59,3 @@ let contentType = mimeTypes.lookup(ext); | ||
key: id, | ||
params: params.s3 | ||
params: s3Params | ||
}) | ||
@@ -57,0 +62,0 @@ .on('error', reject) |
{ | ||
"name": "feathers-blob", | ||
"description": "Feathers blob service", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"homepage": "https://github.com/feathersjs-ecosystem/feathers-blob", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
@@ -65,2 +65,16 @@ # feathers-blob | ||
#### Params: | ||
Query: | ||
- `VersionId` (string): Version ID of document to access if using a versioned s3 bucket | ||
Example: | ||
```js | ||
blobService.get('my-file.pdf', { | ||
query: {VersionId: 'xslkdfjlskdjfskljf.sdjfdkjfkdjfd'}, | ||
}) | ||
``` | ||
## Example | ||
@@ -117,3 +131,8 @@ | ||
## Tests | ||
Tests can be run by installing the node modules and running `npm run test`. | ||
To test the S3 read/write capabilities set the environmental variable `S3_BUCKET` to the name of a bucket you have read/write access to. Enable the versioning functionality on the bucket. | ||
## License | ||
@@ -120,0 +139,0 @@ |
@@ -33,2 +33,3 @@ // TypeScript Version: 3.0 | ||
interface InitOptions { | ||
returnUri?: boolean; | ||
returnBuffer?: boolean; | ||
@@ -35,0 +36,0 @@ Model: AbstractBlobStore; |
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
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
33797
284
141