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

Question: how to upload multiple files?? #49

Closed
Junguya opened this issue Apr 30, 2024 · 2 comments · Fixed by #53
Closed

Question: how to upload multiple files?? #49

Junguya opened this issue Apr 30, 2024 · 2 comments · Fixed by #53
Assignees
Labels
enhancement New feature or request

Comments

@Junguya
Copy link

Junguya commented Apr 30, 2024

image

I want to upload multiple files, not one file.
Please tell me how.

image
I want to come into Swagger like this

@hyeonss0417 hyeonss0417 self-assigned this May 24, 2024
@hyeonss0417 hyeonss0417 linked a pull request Jun 8, 2024 that will close this issue
@hyeonss0417 hyeonss0417 added the enhancement New feature or request label Jun 8, 2024
@hyeonss0417
Copy link
Contributor

Hello, Junguya.

Thank you very much for your interest in our project.
We have reviewed the issue you reported regarding Multiple File Upload, and we have implemented Tspec.BinaryStringArray util type for support it.
To use this feature on your end, please update tspec version to latest(=v0.1.114).

You can use Tspec.BinaryStringArray as follows.

export type FileApiSpec = Tspec.DefineApiSpec<{
  paths: {
    '/files/multiple-upload': {
      post: {
        summary: 'Upload Files',
        /** @mediaType multipart/form-data */
        body: {
          files: Tspec.BinaryStringArray;
        },
        responses: { 200: { fileNames: string[] } },
      },
    },
  },
}>;

Once again, thank you for your valuable feedback. Your contributions help us improve the project significantly.

Best regards,
Hyeonsoneg Jeon.

@Junguya
Copy link
Author

Junguya commented Jun 10, 2024

Thanks to you, I was able to upload multiple files.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants