Uploading file to amazon S3 requires following steps:
I am assuming you have already set up your aws account and IAM users account.
If you have not installed AWS Toolkit for eclipse yet, you refer to this link.
Now we start the process of uploading file to aws S3 storage service.
1. create an upload form in jsp with form action as controller name.
Here, UploadVideoController is name of our controller.
When you use <input type="file"> element, you need to add enctype = "multipart/form-data" attribute to form tag.
enctype attribute's "multipart/form-data" allows entire files to be included in the data.
accept="video/* restricts files to be selected in video format.
2. In our UploadFileController.java,
First add Multipartconfig annotation. This annotation is self descriptive. It simply limits file size parameter.