This is some code that was ripped of a current project and i'm sure that i will need this in the near future for another project.
- dirty extension check
- resize before upload
- upload via ajax using xhr2
<div class="upload">
<div class="upload-button">Upload</div>
<progress min="0" max="100" value="0"></progress>
</div>
TBC