This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createAndUploadThumbnailImg = function (fileObj) { // i.e., <input type=file> | |
console.log('making thumbnail for...'); | |
console.log(fileObj); | |
var reader = new FileReader(); | |
reader.onload = function (e) { | |
// create canvas obj (<canvas>, not added to DOM) | |
// then give it a reference the URL (not on server; on page) made available by FileReader.readAsDataURL() | |
// then use canvas to draw that image at smaller dimensions, effectively copying and resizing it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am lovrin on github. | |
* I am lovrin (https://keybase.io/lovrin) on keybase. | |
* I have a public key whose fingerprint is 496B 9893 B20B 3F15 E10F C6D8 74DD 1072 0CC5 AEAE | |
To claim this, I am signing this object: |