利用SA FileUp组件进行多文件上传

2019-01-14 01:48:01刘景俊

                            strExtension = Mid(strShortFileName, InStrRev(strShortFileName, "."))  '取得扩展名
                            If strRestrictBy = "extension" Then  '--验证方式为扩展名
                                   'strShortFileName = oFileUp.Form(strFormElement).ShortFileName
                                   '======检查后缀名====
                                   Select Case LCase(strExtension)
                                          Case ".jpg", ".gif", ".bmp",".png"

                                          Case Else
                                                 flagOK=0
                                                 oFileUp.Form(strFormElement).Delete
                                                 Response.Write("<B>错误:</B> 扩展名为 <I>" & strExtension & "</I> 的文件不能被上传。<BR>")
                                   End Select
                            Else '--验证方式为MIME类型
                                   strContentType = oFileUp.Form(strFormElement).ContentType
                                   Select Case LCase(strContentType)
                                          Case "image/gif", "image/jpeg", "image/pjpeg"
                                          Case Else