Hello community! My team is faced with a problem where we need to send a resource that is available via URL (more precisely, it is on our classpath). We are running in a servlet container, so we don't have direct access to the file system. I completely understand why the chunks are marked as "Non-repeatable" when using an InputStream, because in general they are not necessarily repeatable.
Currently we are reading the URL in its entirety to memory, then shipping it off. This is quite burdensome because of the size of the resources and number of concurrent users we can expect. The best we can do is create a singleton of the value in memory, but it still is expensive for something which could certainly be streamed. Are there any approaches we can utilize to send a URL's contents to a multi-part while being repeatable without reading it entirely into memory? Thanks! Joe