Proper way to get file sizes in upload_file