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

Use InputStream instead of File for DW server file type #251

Open
kelnos opened this issue Apr 25, 2019 · 1 comment
Open

Use InputStream instead of File for DW server file type #251

kelnos opened this issue Apr 25, 2019 · 1 comment
Labels
core Pertains to guardrail-core java Broadly concerning Java code generation or the generated Java code scala Broadly concerning Scala code generation or the generated Scala code

Comments

@kelnos
Copy link
Member

kelnos commented Apr 25, 2019

File requires that Jersey write out the data to a temp file on disk, while InputStream allows Jersey to stream the data to us.

I'm not sure how well it'll work client-side. Users will have to create a FileInputStream to pass instead of a File (which isn't a big deal), but unclear how to make AsyncHttpClient work with it. AHC has InputStreamBodyGenerator for turning an IS into a request body, but doesn't have something analogous for multipart file parts.

@blast-hardcheese
Copy link
Member

Something similar could be used in scala land as well. File was a stopgap to get anything working. The helper method that generates Files from known parameters per handler route could be altered to produce InputStreams

@blast-hardcheese blast-hardcheese added core Pertains to guardrail-core java Broadly concerning Java code generation or the generated Java code scala Broadly concerning Scala code generation or the generated Scala code labels May 4, 2019
@kelnos kelnos mentioned this issue Mar 26, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Pertains to guardrail-core java Broadly concerning Java code generation or the generated Java code scala Broadly concerning Scala code generation or the generated Scala code
Projects
None yet
Development

No branches or pull requests

2 participants