Added a file check for uploads to the server