Added option to choose upload method
built js
added beforeChunkUpload method
built js
merged in other branches