call the method tempfile.NamedTemporaryFile with arguments: suffix set to string '.upload' and dir set to settings.FILE_UPLOAD_TEMP_DIR.
file = tempfile . NamedTemporaryFile ( suffix = '.upload' , dir = settings . FILE_UPLOAD_TEMP_DIR )