Skip to content

React Native file uploads via FormData #1397

@bnussman

Description

@bnussman

Describe the feature

Hello!

I'm migrating an app from tRPC to oRPC and I'm really enjoying oRPC.

Using Expo, I'm trying to get file uploads (on iOS) to work with my oRPC server.

Currently I'm patching StandardRPCJsonSerializer to make my oRPC client treat my custom ReactNativeFile class as a Blob so that oRPC uses FormData to send the file to my server. This works great and allows me to avoid any base64 encoding/decoding which I really like.

I looked at customJsonSerializers but I don't think it covers what I'm trying to accomplish here.

With my patch in mind, I'm wondering if there is a "first party" way to implement it or if first party support could be added.

Additional information

Would you be willing to help implement this feature?

Maybe? If not, I'll be sure to sponsor via Github to compensate 💵

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions