changed general file size handling from int to long and allow arbitrary file sizes to upload