nestjs-minio
Advanced tools
Comparing version 2.3.0-5 to 2.3.0
{ | ||
"name": "nestjs-minio", | ||
"version": "2.3.0-5", | ||
"version": "2.3.0", | ||
"description": "Minio object storage with nestjs", | ||
@@ -5,0 +5,0 @@ "author": "Rubin Bhandari", |
@@ -59,3 +59,5 @@ <p align="center"> | ||
imports: [ | ||
NestMinioModule.register({ | ||
NestMinioModule.register( | ||
isGlobal: true, | ||
{ | ||
endPoint: 'play.min.io', | ||
@@ -71,3 +73,2 @@ port: 9000, | ||
}); | ||
``` | ||
@@ -91,8 +92,12 @@ Then you can use it in the controller or service by injecting it in the controller as: | ||
import { MINIO_CONNECTION } from '../constants'; | ||
import {Client} from 'minio'; | ||
import {Client, InjectMinio} from 'minio'; | ||
@Controller() | ||
export class NestMinioClientController { | ||
// use inject token | ||
constructor(@Inject(MINIO_CONNECTION) private readonly minioClient: Client) {} | ||
// or use inject decorator | ||
// constructor(@InjectMinio() private readonly minioClient: Client) {} | ||
@Get() | ||
@@ -99,0 +104,0 @@ index() { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
23450
1
127