title: Need to upload file on S3 in Java
body: <p>I have started working on AWS recently. I am currently working on developing upload functionality to S3 storage.</p>
  
  <p>As per my understanding there could be 2 ways to upload a file to S3:-</p>
  
  <ol>
  <li><p>Client's file gets uploaded to my server and i upload this file to S3 server using my credentials. [i will also able to hide this from client as i will not be showing the upload details.]</p></li>
  <li><p>Upload directly to S3</p></li>
  </ol>
  
  <p>I was able to implement the first approach using <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpJava.html" rel="nofollow">simple upload api</a> , but i want to skip the "<strong>write uploaded file to server disk</strong>" part and stream the content directly to S3 storage, while saving the upload details in my database. I also want to achieve the abstraction of AWS details. How do i do it ?? Please help.
  Thanks in advance</p>