fern icon indicating copy to clipboard operation
fern copied to clipboard

Add file as a primitive to support file uploads

Open dsinghvi opened this issue 3 years ago • 6 comments

The definition would need to support multipart form uploads with files and form parameters.

dsinghvi avatar Jun 24 '22 21:06 dsinghvi

We have an endpoint where we upload an image, and another endpoint where we retrieve an image. Can I do that with fern? How do I define that?

https://fern-api.slack.com/archives/C03Q0NFCE3E/p1669922093756529

dannysheridan avatar Dec 01 '22 19:12 dannysheridan

this is now supported

dsinghvi avatar Jun 29 '23 02:06 dsinghvi

Is this supported in all languages or just in the Java SDK?

nlarusstone avatar Oct 12 '23 15:10 nlarusstone

Hey Nicholas -- it is supported in all SDK languages (you might have to upgrade your generator to the latest though). Which one are you using?

dsinghvi avatar Oct 12 '23 15:10 dsinghvi

We're using the FastAPI one:

      - name: fernapi/fern-fastapi-server
        version: 0.3.14

I saw https://github.com/fern-api/fern-python/pull/321 is still open, so I was wondering if maybe not all of the languages support it

nlarusstone avatar Oct 12 '23 15:10 nlarusstone

Yup, FastAPI doesn't support this yet unfortunately.

dsinghvi avatar Oct 12 '23 15:10 dsinghvi

closing in favor of https://github.com/fern-api/fern/issues/5270 which is more specific for FastAPI server codegen

dannysheridan avatar Nov 24 '24 20:11 dannysheridan