Skip to content

Orpc contract with z.file() input allways returns empty {} #1426

@lexer21

Description

@lexer21

Environment

orpc@1.13.5

Reproduction

Clone the following fork https://github.com/lexer21/orpc and run the NestJS example app (playgrounds/nest/) afterwards go to the Scalar client, to the upload planet endpoint (http://localhost:3000/#tag/planets/POST/upload-planet) and under request body set it to binary and select a file. Send the test the request. On the backend the request validates succesfully, but the data returned from the array buffer is not the selected file but just the plain empty object {}. The name of the contract is uploadPlanet, the same happens also if i set inputStructure to detailed.

Image

Describe the bug

Client should send the binary file, but instead just sends the a empty object when using z.file() for input

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamIssue caused by upstream dependency or external repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions