
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
nestjs-cloudinary
Advanced tools
Cloudinary Module for Nest framework
This's a nest-cloudinary module for Nest. This quickstart guide will show you how to install the client SDK and execute an example JavaScript program. For a complete list of APIs and examples, please take a look at the JavaScript Client API Reference documentation.
This document assumes that you have a working nodejs setup in place.
$ npm i --save nestjs-cloudinary
Provide the credentials for cloudinary module by importing it. More options can be passed as per the cloudinary documentation.
import { Module } from '@nestjs/common';
import { CloudinaryModule } from 'nestjs-cloudinary';
@Module({
imports: [
CloudinaryModule.forRootAsync({
imports: [NestConfigModule],
useFactory: (configService: ConfigService) => ({
isGlobal: true,
cloud_name: configService.get('cloudinary.cloudName'),
api_key: configService.get('cloudinary.apiKey'),
api_secret: configService.get('cloudinary.apiSecret'),
}),
inject: [ConfigService],
}),
],
})
export class NestCloudinaryClientModule {}
Then you can use it in the controller or service by injecting it in the controller as:
import { CloudinaryService } from 'nestjs-cloudinary';
constructor(private readonly cloudinaryService: CloudinaryService ) {}
This example program connects to cloudinary storage server then uploads a file.
import { Controller, Get, Inject } from '@nestjs/common';
import { CloudinaryService } from 'nestjs-cloudinary';
@Controller()
export class NestCloudinaryClientController {
constructor(private readonly cloudinaryService: CloudinaryService) {}
@Post('upload')
@UseInterceptors(FileInterceptor('file'))
async uploadFile(@UploadedFile() file: Express.Multer.File) {
return this.cloudinaryService.upload(file);
}
}
FAQs
Cloudinary module for nestjs
The npm package nestjs-cloudinary receives a total of 343 weekly downloads. As such, nestjs-cloudinary popularity was classified as not popular.
We found that nestjs-cloudinary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.