0
내가 업로드 파일 내가오류 긴 크기 파일
404 무엇입니까 JQuery와 fineUploader을 사용하고 들어 XHR 응답 텍스트 구문 분석 할 때 - 파일 또는 디렉터리를 찾을 수 없습니다.
30MB보다 작은 파일의 경우 30MB가 넘는 파일을 업로드 할 때 문제가 없습니다.
화재 버그에서 오류가 표시됩니다 : 나는 Web.config의에서 아래의 설정을 넣어이 문제를 해결해야
public void ProcessRequest(HttpContext context)
{
string directoryID = context.Request["dId"];
var response = new AjaxResponse { ResponseData = "" };
if (!string.IsNullOrEmpty(directoryID))
{
int spaceID = 0;
int dirID = Convert.ToInt32(directoryID);
string directoryPhysicalPath = "D:\\Files\\";
string fileName = context.Request["qqfile"];
string saveLocation = Path.Combine(directoryPhysicalPath, fileUniqueName);
if (!Directory.Exists(directoryPhysicalPath))
{
Directory.CreateDirectory(directoryPhysicalPath);
}
DateTime currentDateTime = DateTime.UtcNow;
var file = new File();
try
{
int bytesRead = 0;
Stream inputStream = context.Request.InputStream;
byte[] buffer = new byte[inputStream.Length];
try
{
using (var fileStream = new FileStream(saveLocation, FileMode.Create))
{
do
{
bytesRead = context.Request.InputStream.Read(buffer, 0, buffer.Length);
fileStream.Write(buffer, 0, bytesRead);
} while (bytesRead > 0);
}
file = new File
{
FileName = fileName
};
//Add to DB Here
}
}
catch (PathTooLongException ex)
{
response.IsError = true;
response.ResponseMessage = ex.Message;
}
File f = //Get data from DB here;
response.ResponseData = f;
context.Response.Write(new JavaScriptSerializer().Serialize(response));
}
}
하나의 오류가 서버 측 코드에 있습니다. 우리가 도울 수 있도록 서버 측 코드를 보여주십시오. 또한 클라이언트 측 코드를 표시하여 onvalidate 오류를보다 잘 이해할 수 있습니다. –
내 로컬 컴퓨터에서 모두 작업하면 서버에서만 오류가 발생합니다. – Vijjendra
@RayNicholus : Updated Question – Vijjendra