Closed gcamrit closed 3 years ago
Did you set the keyfilename
?
gcs must also be installed with the package below. @slynova/flydrive-gcs see
i have already installed @slynova/flydrive-gcs
package and provided key file name via env like GOOGLE_APPLICATION_CREDENTIALS=./gcloud.json
@tienne Do i need to register gcs driver somewhere ?
Yes As shown in the example below, you must register using the registerDriver method first.
this.storage.registerDriver('s3', AmazonWebServicesS3Storage);
Sorry, I wrote the wrong example
where do i put the registration code on app.module.ts ?
I am using the service registered as below.
// image-storage.service.ts
import { Injectable } from '@nestjs/common';
import { AmazonWebServicesS3Storage } from '@slynova/flydrive-s3';
import { StorageService } from '@codebrew/nestjs-storage';
@Injectable()
export class ImageStorageService {
private readonly disk: AmazonWebServicesS3Storage;
constructor(private storage: StorageService) {
if (this.disk === undefined) {
this.storage.registerDriver('s3', AmazonWebServicesS3Storage);
this.disk = this.storage.getDisk<AmazonWebServicesS3Storage>();
}
}
//...
}
Is this issue resolved by any chance? @gcamrit
Yup thanks for the help
I am having issue reading
google cloud storage
filesapp.module.ts
when i try to use
storage service
andgetSignedUrl
i get driver gcs is not supported error