I am using the s3 sdk to upload a string (which will be change into a txt file). It is ok using the sdk. But since the sdk is only available for new browser (eg: ie10+) I need to upload my file with another way (for old browser)
For image file I use an input (type file) and a form for the upload
<form id="urlform" enctype="multipart/form-data" method="post" target="upload_target" class="inline">
<input type="hidden" name="key" value="{{$parent.keyurl}}">
<input type="hidden" name="acl" value="public-read">
<input type="hidden" name="AWSAccessKeyId" value="{{$parent.awSAccessKeyIdUrl}}">
<input type="hidden" name="success_action_redirect" value="{{$parent.redirectionUrl}}">
<input type="hidden" name="x-amz-meta-filename" value="{{$parent.filenameurl}}">
<input type="hidden" name="policy" value="{{$parent.policyurl}}">
<input type="hidden" name="signature" value="{{$parent.signatureurl}}">
<input type="hidden" name="x-amz-security-token" value="{{$parent.urlSessionToken}}">
<div>
<label>
</label>
<input type="file" name="file" id="urlfileinput">
</div>
</form>
this solution only works with input type file .
For security reason I can't change the value of the input with jquery.
Is there another way to upload text (using the rest api perhaps) ?