We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@atls/nestjs-gcs-client
Интеграциюя с GCS максимально прозрачной и удобной в DI NestJS
import { Module } from '@nestjs/common' import { GcsClientModule } from '@atls/nestjs-gcs-client' @Module({ imports: [ GcsClientModule.register({ keyFilename: 'path/to/key.json', apiEndpoint: 'https://storage.googleapis.com', }), ], }) export class AppModule {}
import { Module } from '@nestjs/common' import { GcsClientModule } from '@atls/nestjs-gcs-client'' import { ConfigModule, ConfigService } from '@nestjs/config' @Module({ imports: [ ConfigModule.forRoot(), GcsClientModule.registerAsync({ imports: [ConfigModule], useFactory: async (configService: ConfigService) => ({ keyFilename: configService.get<string>('GCS_KEY_FILENAME'), apiEndpoint: configService.get<string>('GCS_API_ENDPOINT'), }), inject: [ConfigService], }), ], }) export class AppModule {}
import { Injectable } from '@nestjs/common' import { GcsClientFactory } from '@atls/nestjs-gcs-client'' @Injectable() export class StorageService { private storage constructor(private readonly gcsFactory: GcsClientFactory) { this.storage = gcsFactory.create() } async uploadFile(bucketName: string, filePath: string, destination: string) { const bucket = this.storage.bucket(bucketName) await bucket.upload(filePath, { destination }) } }
No response
The text was updated successfully, but these errors were encountered:
Пакет опубликован https://www.npmjs.com/package/@atls/nestjs-gcs-client
Sorry, something went wrong.
TorinAsakura
Successfully merging a pull request may close this issue.
Название пакета
@atls/nestjs-gcs-client
Для чего нужен пакет?
Интеграциюя с GCS максимально прозрачной и удобной в DI NestJS
Пример использования
Пример
Асинхронная регистрация
Использование в сервисе
Материалы
No response
The text was updated successfully, but these errors were encountered: