UploadedFile - no more access to InputStream from 5.2 on

DMX 5.1 allowed me to get the InputStream of an UploadedFile. This allowed me to read binary data and hand the input directly into 3rd party libraries (e.g. Apache POI for OOXML data).
Since recently the InputStream became a private field and the only publics accessors work on String instances.
Am I supposed to use a different approach to get the input stream of an uploaded file? If not I’d ask to re-introduce a way to get the file data as an input stream or a similarly capable data format.

1 Like

Robert @tbh –– Maybe it’s worth considering to reformat a Microsoft Word document to JSON and publish it as an instance of dmx?

Apache POI was just an example. I have other data as CSV as well.

Confirmed! UploadedFile's getInputStream() was dropped in the course of 5.2’s refactoring of the upload feature.
https://git.dmx.systems/dmx-platform/dmx-platform/-/issues/445

Now getInputStream() is back in 5.3-SNAPSHOT:
https://git.dmx.systems/dmx-platform/dmx-platform/-/commit/6efc2066

Thank you for posting!

1 Like