How can I use one stream and save result to many places?
- by plasticrabbit
I using servlet and Apache ServletFileUpload that provides stream to uploaded image. All I want to do is to store that image to db and also store resized (I using JAI) version to db.
How can I achieve this without saving image to drive. As I understand stream can be read only once. So I need to store whole image in memory? Is it expensive for performance? Or there are another way?