Open jonasschultheiss opened 4 years ago
let storageOptions: S3StorageOptions;
const extendedOptionProperty = Object.keys(this.localOptions)[0];
switch (extendedOptionProperty) {
Could it be, that this part only takes the first property into account and then switches through it?
Thanks for opening an issue @jonasschultheiss First of all, sorry for the late response. Currently, we don't support the feature that you're trying to achieve. May I ask why you want this feature?
I'd like to have this feature, so I have a thumbnail and both have a unique name.
@jonasschultheiss
Sounds fair to me. Would you like to create a PR for this?
sure, but make sure to review it, as I don't have that much experience with open source projects
@jonasschultheiss No worries! I can help you if you need anything 😀
@jonasschultheiss are you still working on a PR for this?
No, the work and final phase at school are a bit stressful for me. I like to work on it at the beginning of the new year.
Any, news on this?.
I think we only need to add
randomFilename: this.localOptions.randomFilename
like dynamicPath: this.localOptions.dynamicPath,
in https://github.com/jeffminsungkim/nestjs-multer-extended/blob/25c824838edfa900548f671b9640aa9b4bdbfa72/lib/interceptors/amazon-s3-file.interceptor.ts#L63 on every siwtch statement
Hey, first of all, cool package. It's really easy to upload to a s3 with this.
One thing I noticed on my project was, that the second property of
MulterExtendedOptions
doesn't seem to make a difference in theAmazonS3FileInterceptor
. What I'd like to have random file names and thumbnails, but it appears to ignore the second option.Example 1 ->
thumbnail
first: 1.1. Code1.2 Console out
Example 2 ->
randomFileName
first 2.1. Code2.2 Console out
As you can see, the first example creates a thumbnail but doesn't upload the file with a random name, while the second example does the oposite.
If I made a mistake in my code, feel free to tell me.