Skip to content
Discussion options

You must be logged in to vote

Stoplight wants either contentEncoding: "base64" or contentMediaType: "application/octet-stream" to identify a field as a file input.

#422 aims to fix that by adding contentMediaType: "application/octet-stream" whenever the format defined is the schema is binary.
Alternatively, you could use base64 (schema.ContentEncoding = "base64") encoding if that works for you, though that involves encoding/decoding the b64 string both on the client and server sides.

On a side note, draft PR #415 is on the way to improve support and documentation for file uploads.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@danielgtaylor
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by wolveix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants