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

Upload multiple files with different field names #1493

Closed
2 of 4 tasks
samuelexferri opened this issue Oct 6, 2023 · 5 comments · Fixed by #1541
Closed
2 of 4 tasks

Upload multiple files with different field names #1493

samuelexferri opened this issue Oct 6, 2023 · 5 comments · Fixed by #1541

Comments

@samuelexferri
Copy link

samuelexferri commented Oct 6, 2023

Sorting

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • I confirm that I

    • used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

I want to upload multiple files with different field names but this is not possible. I can only upload multiple files with the same field name.

Current Behavior

    @Patch("/uploadFile")
    @Security("jwt", ["user"])
    @Middlewares(checkMiddleware.checkUserIsEnabled)
    @SuccessResponse("200", "Files uploaded successfully")
    public async uploadFile(
        @UploadedFile("file1") profileImage: Express.Multer.File,
        @UploadedFile("file2") profileImage1: Express.Multer.File,
        @Request() expressRequest: express.Request
    ): Promise<Obj> {
        this.setStatus(HttpStatusCode.OK);
        const req = expressRequest as RequestCustomUser;
        const obj = await FileService.uploadFile(
            req.token,
            file1,
            file2,
        );
        return obj;
    }

Possible Solution

Steps to Reproduce

Context (Environment)

Version of the library: 5.1.1
Version of NodeJS: 20

  • Confirm you were using yarn not npm: [X]

Detailed Description

Breaking change?

@samuelexferri
Copy link
Author

Similar to #1295

@samuelexferri samuelexferri changed the title Upload multiple file with different field name Upload multiple files with different field names Oct 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Nov 6, 2023
@samuelexferri
Copy link
Author

Up

@github-actions github-actions bot removed the Stale label Nov 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Dec 7, 2023
@samuelexferri
Copy link
Author

Up

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

Successfully merging a pull request may close this issue.

2 participants