ewebeditor不能上传视频文件???
ewebeditor所有功能都可以用,可就是上传视频文件会提示文件格式不正确,我检查了格式没问题.看了upload.asp文件,发现上传不正确格式的文件时程序正确运行,可一旦上传正确格式文件时扩展名就丢失。这是怎么回事啊
Set oFile = oUpload.File( "uploadfile ")
sFileExt = LCase(oFile.FileExt)????
Call CheckValidExt(sFileExt)
Sub CheckValidExt(sExt)
Dim b, i, aExt
b = False
aExt = Split(sAllowExt, "| ")
For i = 0 To UBound(aExt)
If LCase(aExt(i)) = sExt Then
b = True
Exit For
End If
Next
If b = False Then
OutScript( "parent.UploadError( '提示:\n\n请选择一个有效的文件,\n支持的格式有( "+sAllowExt+ ")! ') ")
Response.End
End If
End Sub
------解决方案--------------------可以的
<form action= "?action=save&type= <%=sType%> &style= <%=sStyleName%> " method=post name=myform enctype= "multipart/form-data ">
...
Select Case sType
Case "FILE "
sAllowExt = oRs( "S_FileExt ")
nAllowSize = oRs( "S_FileSize ")
Case "MEDIA "
sAllowExt = oRs( "S_MediaExt ")
nAllowSize = oRs( "S_MediaSize ")
Case "FLASH "
sAllowExt = oRs( "S_FlashExt ")
nAllowSize = oRs( "S_FlashSize ")
Case Else
sAllowExt = oRs( "S_ImageExt ")
nAllowSize = oRs( "S_ImageSize ")
End Select
...
默认上传的文件为图片,需要修改form action的type参数,格式文件的后缀和文件大小限制见
ewebeditor数据库中的ewebeditor_style表.
------解决方案--------------------楼上正解