I did follow all instructions from README and getting this exception:
[Nest] 66802 - 07/09/2020, 12:28:56 PM [ExceptionsHandler] Cannot read property 'storageOpts' of undefined +10269ms
TypeError: Cannot read property 'storageOpts' of undefined
at MixinInterceptor.pickStorageOptions (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:69:112)
at MixinInterceptor. (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:43:48)
at Generator.next ()
at /Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:20:71
at new Promise ()
at __awaiter (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:16:12)
at MixinInterceptor.intercept (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:40:20)
at /Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:22:36
at InterceptorsConsumer.intercept (/Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:24:24)
at /Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/router/router-execution-context.js:45:60
I did follow all instructions from README and getting this exception:
[Nest] 66802 - 07/09/2020, 12:28:56 PM [ExceptionsHandler] Cannot read property 'storageOpts' of undefined +10269ms TypeError: Cannot read property 'storageOpts' of undefined at MixinInterceptor.pickStorageOptions (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:69:112) at MixinInterceptor. (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:43:48)
at Generator.next ()
at /Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:20:71
at new Promise ()
at __awaiter (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:16:12)
at MixinInterceptor.intercept (/Users/alex/Projects/AlumniAces-Backend/node_modules/nestjs-multer-extended/dist/interceptors/amazon-s3-file.interceptor.js:40:20)
at /Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:22:36
at InterceptorsConsumer.intercept (/Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:24:24)
at /Users/alex/Projects/AlumniAces-Backend/node_modules/@nestjs/core/router/router-execution-context.js:45:60
I use this controller action:
If I remove randomFilename option it just prints out file object but doesn't upload to S3.
Also I see it uses correct S3 settings:
[Nest] 66802 - 07/09/2020, 12:28:29 PM [MulterConfigLoader] {"accessKeyId":"*","secretAccessKey":"*****","region":"us-east-1","bucket":"***","basePath":""}
Anything I did wrong?