Asp classic 如何使用NicEdit和经典asp上传图像

Asp classic 如何使用NicEdit和经典asp上传图像,asp-classic,vbscript,nicedit,Asp Classic,Vbscript,Nicedit,我想用经典的asp使用nicedit图像上传。默认情况下,Nicedit将图像上传到ImageShack,但我希望将图像发送到我的服务器。但是,我很难将原始PHP脚本的一些特性适应经典asp。我发现上传图像并以javascript格式返回图像信息,并生成一个进度条 <script> try{ top.nicUploadButton.statusCb({'done':1,'url':'$link','width':30}); } catch(e)

我想用经典的asp使用
nicedit
图像上传。默认情况下,Nicedit将图像上传到ImageShack,但我希望将图像发送到我的服务器。但是,我很难将原始PHP脚本的一些特性适应经典asp。我发现上传图像并以javascript格式返回图像信息,并生成一个进度条

<script>
    try{
        top.nicUploadButton.statusCb({'done':1,'url':'$link','width':30});
    }
    catch(e) {
        alert(e.message);
    }
</script>

试一试{
statusCb({'done':1,'url':'link','width':30});
}
捕获(e){
警报(e.message);
}
PHP具有提供进度条的内置函数,我在vbscript中设置进度条时遇到困难

有人可以指导我应该实现什么,使这个脚本的基本功能保留在asp版本中吗?谢谢

==更新==

我制作的上传脚本运行良好,但我需要帮助来制作进度条。我通常使用,但想帮助,以使它在这个上传过程中的工作

<%
Server.ScriptTimeout = 26000

UplMaxSize = 1048576
sExtL = "jpg,jpeg,png,gif,bmp"

Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = True
Upload.SetMaxSize UplMaxSize, True 
nCount = Upload.Save
If nCount > 0 Then
Set File  = Upload.Files(1)
sFileName = File.FileName
sWidth    = File.ImageWidth

If Err.Number = 8 Then
    Set uplresult = jsObject()
        uplresult("error") = "O tamanho do arquivo excedeu o limite!"
    uplresult.Flush ' estampa json
    Response.End()
End If

If Not File Is Nothing Then
    ' Save the file to the file system
    sPath = Server.MapPath(".\public\upimages")

    Set oFSO = Server.CreateObject("Scripting.FileSystemObject")

    sExt = oFSO.GetExtensionName(sPath & sFileName)
    If Not (InStr(sExtL,sExt) > 0) Then
        Set uplresult = jsObject()
            uplresult("error") = "Extensão de arquivo inválida!"
        uplresult.Flush ' estampa json
        Response.End()
    End If
    File.SaveAs sPath & "\" & sFileName
    Response.Write("<script>try  {top.nicUploadButton.statusCb({'done':1,'url':'/blog/public/upimages/" & sFileName & "','width':" & sWidth & "});} catch(e) {alert(e.message);}</script>")
End If
End If
%>
0那么
Set File=Upload.Files(1)
sFileName=File.FileName
sWidth=File.ImageWidth
如果错误编号=8,则
设置uplresult=jsObject()
uplresult(“错误”)=“O tamanho do arquivo excedeu O limite!”
uplresult.Flush'estampa json
答复:End()
如果结束
如果不是,那么文件什么都不是
'将文件保存到文件系统
sPath=Server.MapPath(“.\public\upimages”)
Set of so=Server.CreateObject(“Scripting.FileSystemObject”)
sExt=oFSO.GetExtensionName(sPath和sFileName)
如果不是(仪表(sExtL,sExt)>0),则
设置uplresult=jsObject()
uplresult(“error”)=“延伸到因瓦利达的阿尔基沃!”
uplresult.Flush'estampa json
答复:End()
如果结束
File.SaveAs sPath&“\”&sFileName
Response.Write(“try{top.nicUploadButton.statusCb({'done':1,'url':'/blog/public/upimages/”&sFileName&“,'width':”&sWidth&“});}catch(e){alert(e.message);}”)
如果结束
如果结束
%>