upload file to s3 using javascript sdk
<script type="text/javascript">function s3upload() { var files = document.getElementById('fileUpload').files; if (files) { var file = files[0]; var fileName = file.name; var filePath = 'my-first-bucket-path/' + fileName; var fileUrl = 'https://' + bucketRegion + '.amazonaws.com/my- first-bucket/' + filePath; s3.upload({ Key: filePath, Body: file, ACL: 'public-read' }, function(err, data) { if(err) { reject('error'); } alert('Successfully Uploaded!'); }).on('httpUploadProgress', function (progress) { var uploaded = parseInt((progress.loaded * 100) / progress.total); $("progress").attr('value', uploaded); }); }};</script>
Also in CSS:
- border shorthand
- css reset margin padding
- html5 input required length
- css note
- nice button css
- css circle border
- font-weight css
- css flex
- css wordwrap
- add css file in html
- add css
- scss react
- link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"
- css flex divide evenly
- italic in css
- scss media query
- css textarea limit
- css no bottom ouline
- how to set border length in css without div
- unselectable css property
- css center table on page
- css print has background graphics
- sketchup make
- link css with path