这是我的处理程序 UploaderPic.ashx ,用于在托管服务器中上传图片
public class UploadBild : IHttpHandler {
public void ProcessRequest (HttpContext context) {
foreach (UploadedFile validFile in context.Request.Files) {
// save to the hosted server
}
}
}
以下是另一个视图中来自另一个视图的click事件,该视图来自名为 UploaderVideo.aspx.cs 的单独应用程序,用于将视频上传到托管服务器中(基本上)
protected void btnUpload_Click(object sender, EventArgs e) {
// saving the posted video in the tempdata folder
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/TempData/") + FileUpload1.FileName.ToLower());
// generating the thumbnail using the NReco video player and saving it to Thumbnails folder
var ffMpeg = new FFMpegConverter();
ffMpeg.GetVideoThumbnail(Server.MapPath("~/TempData/") + FileUpload1.FileName.ToLower(),
Server.MapPath("~/Thumbnails/") + Path.GetFileNameWithoutExtension(FileUpload1.FileName.ToLower()) + ".jpg",
3.0f
);
using (var wb = new WebClient())
{
// tag the thumbnail_videoname.jpg in the request object for the handler
}
}
这是我的应用程序中的基本代码,但问题是