IO / HTTP Error in Uploadify

I am trying to upload work to work. When I try to load something, the view function works fine, but there is a breif pause, and then I get either an “HTTP error” or an “I / O error”.

The progress bar does not appear, which made me think that it might be a path problem, but the swf file is in the same place as the images / scripts that seem to find OK.

Does anyone have any experience?

+4
source share
1 answer

Did you use a common handler ( .ashx ) to get the file? Here is my code

 Public Class Video_File_Upload Implements System.Web.IHttpHandler 'Dim File_Path_Chapter_Video As String = "XXX/" Dim Directory_Videos As String = System.Configuration.ConfigurationManager.AppSettings("Videos_Save") Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest context.Response.ContentType = "text/plain" context.Response.Expires = -1 Try Dim postedFile As HttpPostedFile = context.Request.Files("Filedata") Dim filename As String = postedFile.FileName 'string folderName = context.Request.QueryString["FolderName"]; Dim NOF As String Dim CheckFilePath As String Dim MapPath As String NOF = Convert.ToString(context.Request("NOF")) CheckFilePath = Directory_Videos & NOF If Directory.Exists(CheckFilePath) = False Then Directory.CreateDirectory(CheckFilePath) End If MapPath = Directory_Videos & NOF & "/" & filename postedFile.SaveAs(MapPath) Catch End Try End Sub ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property End Class 

Then you should put this line in the upload setting: "uploadScript: Video_File_Upload.ashx"

0
source

All Articles