Added max-size check in js  uploader script