Added filelimit and event before all with files.

before all event so its possible to check all the files before you start with uploading in javascript.
And a file limit to be able to limit the amount of files to be uploaded at the same time.