public string PostFile([FromForm] IFormCollection formCollection) { var files = formCollection.Files; String RandFileName = ""; if (files.Count == 0) { RandFileName = "找不到上传的文件"; } foreach (var formFile in files) { RandFileName = _FileUploadService.PostFile(formFile); } return(RandFileName); }