jQuery-File-Upload 플러그인 인터페이스가 훌륭하고 완벽하게 작동한다고 생각합니다! 나는 그것을 아주 많이 좋아! 하지만 내 서버는 Classic ASP iis ... 이제 jQuery-File-Upload를 사용하여 파일 (이미지 파일)을 업로드하고 싶습니다. 제발 나를 도와주세요!jQuery 파일 업로드 Classic-ASP
내 서버에 3 파일이있어 업 로더가 정상적으로 작동합니다! 이제 index.asp와 같은 html5 파일을 추가하고 싶습니다. jQuery-File-Upload basic-plus us를 사용하십시오. 진행 막대, 유효성 검사, 미리보기 이미지 및 클라이언트 측 이미지 크기 조정이 필요합니다. 아마도 너무 복잡합니다.
어쩌면 우리는 단지 "jQuery를 - 파일 업로드/index.html을"나는 누군가가 나를 인도 희망<form id="fileupload" action="http://myserver.com/html5/upload.asp" method="POST" enctype="multipart/form-data">
을 편집 할 수 있습니다.
제발 나를 도와주세요! 그리고 ... 내 영어 죄송
3 파일
<!DOCTYPE html>
<html>
<head>
<meta charset="gbk" />
<title>fileReader对象的事件先后顺序</title>
</head>
<body>
单文件上传<br />
<form action="upload.asp" method="post" enctype="multipart/form-data">
<p>
表单:<input type="text" name="form1" value="form1_text" /><br />
文件:<input type="file" id="file" name="file1" multiple />
<input type="submit" value="上传" />
</p>
<div name="result" id="result">
</div>
</form>
</body></html>
2 /html5/index.asp
<!--#include file="UpLoad_Class.asp"-->
<%
dim upload
set upload = new AnUpLoad
upload.Exe = "*"
upload.MaxSize = 2 * 1024 * 1024 '2M
upload.GetData()
if upload.ErrorID>0 then
response.Write upload.Description
else
dim file,savpath
savepath = "upload"
for each frm in upload.forms("-1")
response.Write frm & "=" & upload.forms(frm) & "<br />"
next
set file = upload.Files("file1")
if file.isfile then
result = file.saveToFile(savepath,0,true)
if result then
response.Write "文件'" & file.LocalName & "'上传成功,保存位置'" & server.MapPath(savepath & "/" & file.filename) & "',文件大小" & file.size & "字节<br />"
else
response.Write file.Exception & "<br />"
end if
end if
set file = upload.Files_Muti("file1",1)
if file.isfile then
result = file.saveToFile(savepath,1,true)
if result then
response.Write "文件'" & file.LocalName & "'上传成功,保存位置'" & server.MapPath(savepath & "/" & file.filename) & "',文件大小" & file.size & "字节<br />"
else
response.Write file.Exception & "<br />"
end if
end if
Response.Write "成功保存的文件个数:" & Upload.QuickSave("file1",savepath) & "个"
end if
set upload = nothing
%>
3 /html5/UpLoad_Class.asp을 /html5/index.asp `내가 jQuery를 - 파일 업로드 나 자신과 약간 혼란스러워했다
<%
Dim StreamT
Class AnUpLoad
Private Form, Fils
Private vCharSet, vMaxSize, vSingleSize, vErr, vVersion, vTotalSize, vExe, vErrExe,vboundary, vLostTime, vMode, vFileCount,StreamOpened
private vMuti,vServerVersion
Public Property Let Mode(ByVal value)
vMode = value
End Property
Public Property Let MaxSize(ByVal value)
vMaxSize = value
End Property
Public Property Let SingleSize(ByVal value)
vSingleSize = value
End Property
Public Property Let Exe(ByVal value)
vExe = LCase(value)
vExe = replace(vExe,"*.","")
vExe = replace(vExe,";","|")
End Property
Public Property Let CharSet(ByVal value)
vCharSet = value
End Property
Public Property Get ErrorID()
ErrorID = vErr
End Property
Public Property Get FileCount()
FileCount = Fils.count
End Property
Public Property Get Description()
Description = GetErr(vErr)
End Property
Public Property Get Version()
Version = vVersion
End Property
Public Property Get TotalSize()
TotalSize = vTotalSize
End Property
Public Property Get LostTime()
LostTime = vLostTime
End Property
...................................ect ...i think you guys knows
은 그냥 jQuery를 - 파일 업로드 페이지에서 zip 파일을 다운로드 한. PHP 1과 동등한 ASP 처리기 스크립트가 제공되지 않으므로 zip 파일의 PHP 파일을 가져 와서 Classic ASP에서 다시 작성해야 할 것입니다. 당신이 요구하는 기능 중 일부를 가지고 ASP 스크립트입니다, 이것 좀 봐 - http://www.uploadify.quickersite.com/. 또는 IIS 서버가 PHP를 지원해야하며 PHP가 이미 설치되어있을 수도 있습니다. 따라서 PHP 처리기 스크립트를 그대로 사용할 수 있습니다. – John
존 감사합니다! 내 서버는 asp classic 만 지원합니다 ... 그래서 PHP를 ASP로 변환해야 할 수도 있습니다 ... 그러나 그것은 어려운 일입니다. -_- !! – hakaman
불행히도, 서버의 털이 많은 부분에 깊이 관여 할 준비가되어 있지 않다면, 기존 코드 중 하나를 고전적인 ASP로 변환하면 Not Easy (TM)의 영역으로 단단히 떨어질 것입니다. 기존 ASP에서 작동하도록 설계된 업로드 유틸리티를 찾아야합니다. (내가 요즘 알고있는 유일한 것은 Persits의 AspUpload 다.) – Martha