Skip to content
New issue

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

Support for multiple file upload #165

Open
imamkhaira opened this issue Jun 4, 2020 · 11 comments
Open

Support for multiple file upload #165

imamkhaira opened this issue Jun 4, 2020 · 11 comments

Comments

@imamkhaira
Copy link

imamkhaira commented Jun 4, 2020

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 😁

@jeffminsungkim
Copy link
Owner

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

@imamkhaira
Copy link
Author

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

@jeffminsungkim
Copy link
Owner

Awesome! 😃

@mhhonline
Copy link

Greate news,

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

Regards,

@jeffminsungkim
Copy link
Owner

@imamkhaira Any updates?

@FlxEd
Copy link

FlxEd commented Jan 29, 2021

Would be interested as well :)

@nomanbiniqbal
Copy link

any update

@jnovak-SM2Dev
Copy link

jnovak-SM2Dev commented Feb 22, 2022

Any update on this? @jeffminsungkim @imamkhaira

@jnovak-SM2Dev
Copy link

jnovak-SM2Dev commented Feb 22, 2022

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> {}

@leonardoad
Copy link

That looks good!
Just waiting on the PR merge!

@chihabhajji
Copy link

SITREP ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants