title: How to convert an S3 object to a Resource in springBoot?
body: <p>I have a video which is of S3Object type. </p>
  
  <p>I am trying to convert it to a Resource using the following code.</p>
  
  <pre><code>Resource resource = new InputStreamResource(video.getObjectContent());
  </code></pre>
  
  <p>I get the following error </p>
  
  <pre><code>"InputStream has already been read - do not use InputStreamResource if a stream needs to be read multiple times"
  </code></pre>
  
  <p>Is it possible to read an S3Object directly as a Resource?</p>
  
  <p>How can I correct it?</p>