我有以下代码用于在我的网站中上传文件:
@using (Html.BeginForm("UploadProfileImage", "Member", FormMethod.Post, new { @encType = "multipart/form-data" }))
{
@Microsoft.Web.Helpers.FileUpload.GetHtml(initialNumberOfFiles: 1, includeFormTag: false, uploadText: "Upload File",allowMoreFilesToBeAdded:false)
<span class="success">@ViewData["SuccessMessage"]</span>
<input class="button" type="submit" name="submit" value="Upload" />
}
我希望它能够在用户从“浏览”按钮中选择文件后自动发布。目前,每次用户选择要上传的文件时,用户都必须点击上传,无论如何要使这个过程自动化?