nestjs-multer-extended icon indicating copy to clipboard operation
nestjs-multer-extended copied to clipboard

Support for multiple file upload

Open imamkhaira opened this issue 4 years ago • 11 comments

Hi, I noticed that this module supports only one file upload at a time. Is there any plan to support uploading multiple/array of files? (using @UploadedFiles decorator). Thank you 😁

imamkhaira avatar Jun 04 '20 00:06 imamkhaira

@imamkhaira Sounds like a great idea! Definitely, love to add that feature. Would you like to create a PR?

jeffminsungkim avatar Jun 08 '20 02:06 jeffminsungkim

sure, I'll start adding changes and make a pull request

imamkhaira avatar Jun 08 '20 22:06 imamkhaira

Awesome! 😃

jeffminsungkim avatar Jun 09 '20 00:06 jeffminsungkim

Greate news,

Thanks for the efforts, any timeline expected for this upgrade?

Regards,

mhhonline avatar Jun 16 '20 05:06 mhhonline

@imamkhaira Any updates?

jeffminsungkim avatar Jul 10 '20 08:07 jeffminsungkim

Would be interested as well :)

FlxEd avatar Jan 29 '21 17:01 FlxEd

any update

nomanbiniqbal avatar Jun 24 '21 10:06 nomanbiniqbal

Any update on this? @jeffminsungkim @imamkhaira

jnovak-SM2Dev avatar Feb 22 '22 16:02 jnovak-SM2Dev

I added a pull request for this (will need updated documentation) #518. It's based off FileFieldsInterceptor

You would use like:

@UseInterceptors(
    AmazonS3FilesInterceptor(
        [
            { name: "logo", maxCount: 1 },
            { name: "header", maxCount: 1 },
        ],
        {
            randomFilename: true,
        }
    )
)
async create(
    @Body() createUserDto: CreateUserDto,
    @UploadedFiles() files: { logo; header },
  ): Promise<User> {}

jnovak-SM2Dev avatar Feb 22 '22 17:02 jnovak-SM2Dev

That looks good! Just waiting on the PR merge!

leonardoad avatar Apr 07 '22 01:04 leonardoad

SITREP ?

chihabhajji avatar Apr 05 '23 19:04 chihabhajji