Resizes file uploads and stores them in a given directory