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

Is there an example of working with IO streams over File/Path? #32

Closed
xSAVIKx opened this issue Aug 29, 2023 · 4 comments
Closed

Is there an example of working with IO streams over File/Path? #32

xSAVIKx opened this issue Aug 29, 2023 · 4 comments

Comments

@xSAVIKx
Copy link

xSAVIKx commented Aug 29, 2023

So I have a case where I have no file system representation of the document and only have either an IO stream or byte[] on hand to work with. I seem to struggle to find an example for my case, can someone pinpoint it please or let me know how can one work with IO streams or byte arrays?

@JonasJasas
Copy link
Contributor

Example of source file from the stream

Result file has asStream method.

@xSAVIKx
Copy link
Author

xSAVIKx commented Aug 30, 2023

Example of source file from the stream

Result file has asStream method.

Thank you for your reply. The problem is that I don't have access to the file system. Meaning that I can write any files. Is there maybe a way to provide an API that works with streams?

@JonasJasas
Copy link
Contributor

You don't need a file system. An example creates a stream from the file, but the stream can be created from any source.
If you are concerned about the file name: new Param("file", stream, "test.docx") File name test.docx can be anything, important is to provide file extension correctly.

@xSAVIKx
Copy link
Author

xSAVIKx commented Sep 7, 2023

Got it working. Thx for your help 👍

@xSAVIKx xSAVIKx closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants