shawl.qiu ASP 无组件上传类 1.0 Beta 版 发布

本版由于 IE 提交完全客户端文件路径, 鄙人很少用 IE, 现在才发现问题.
新一版已解决该问题:  shawl.qiu ASP 无组件上传类 1.0 Final 版.

URL: http://blog.youkuaiyun.com/btbtd/archive/2006/09/30/1309457.aspx
shawl.qiu
2006-09-30

shawl.qiu ASP 无组件上传类 1.0 Beta 版

主要功能:
支持自定义上传N个文件
支持自定义文件名前缀
支持随机自定义文件名后缀
支持任何编码的中文文件名
支持自定义上传文件框个数

说明:
为了方便使用, 把表单域也封装进class(类)

后续版本待加功能:
增加文件上传总大小限制
增加单个文件总大小限制
增加自定义允许上传的文件类型
增加检测特定文件类型包含恶意代码的功能
Subject: shawl.qiu ASP 无组件上传类 1.0 Beta 版

Author: shawl.qiu
Version: 1.0 Beta
Date: 2006-09-27
Blog:   http://blog.youkuaiyun.com/btbtd
E-Mail:  shawl.qiu@gmail.com

目录: 
1. shawl.qiu ASP 无组件上传类(cUpload)及演示
2. 上传预览

本文原格式: http://my.opera.com/btbtd/homes/article/shawl.qiu_upload_1.0Beta.htm

shawl.qiu@gmail.com
2006-09-27
  http://blog.youkuaiyun.com/btbtd

1. shawl.qiu ASP 无组件上传类(cUpload)及演示: 
  1. linenum
  2. <%
  3.     dim upload
  4.     set    upload=new cUpload
  5.         with upload
  6.             .header '头部信息 [非必须]
  7.             '---------------------------------------
  8.             ' 页面设置:
  9.             '--------------------
  10.             .upQueryString=request.queryString("id") '目标查询 ID [必选项]
  11.             .upCharSet="utf-8" '页面编码 [必选项], 请正确设置页面编码! 
  12.             '---------------------------------------
  13.             ' 上传文件各参数设置:
  14.             '--------------------
  15.             .upBinaryTotal=cLng(request.TotalBytes) '读取二进制字节长度  [必选项]
  16.             .upPath="/saveimg/" ' 默认存放路径 [必选项]
  17.             .upOverWrite=2 ' 上传文件是否覆盖原有文件设置. 1 或空为不覆盖, 2 为覆盖, 默认为 1 [非必选]
  18.             '---------------------------------------
  19.             ' 表单域默认值:
  20.             '--------------------
  21.             ' 提交表单目标地址, 处理上传操作 ID值必须为 upfile, 如 ?xxx=upfile [必选项]
  22.             .upAction="?id=upfile" 
  23.             .upNumber= 5 ' 显示上传文件 文件框 数量. 最小为1, 最大为 99, 默认为 1 [非必选]
  24.             .fileNamePrefix="前缀" ' 自定义文件名前缀, 不想加前缀, 注释掉此项 [非必选]
  25.             .fileNamePostfix=1 ' 是否添加随机后缀, 空值不添加, 注释掉此项 [非必选]
  26.             '---------------------------------------
  27.             .pgUpFile ' 处理上传文件操作 [必选项]
  28.             .pgUpForm ' 上传文件表单域 [必选项]
  29.             '---------------------------------------
  30.             ' 文件上传操作相关信息:
  31.             ' response.write join(.upFilePathArray,"<br/>") ' 存储所有文件路径的数组 [非必选]
  32.             .pgUploadInfo ' 表单域内容相关信息及已上传文件相关信息 [非必选]
  33.             '.pgShowImage ' 显示已上传的图片文件 [非必选]
  34.             
  35.             .info ' 功能信息 [非必选]
  36.             .auther ' 作者及版本信息 [非必选]
  37.         end with
  38.     set upload=nothing    
  39.     
  40.     class cUpload
  41.     'dim upload
  42.     'set    upload=new cUpload
  43.         'with upload
  44.             ''---------------------------------------
  45.             '' 页面设置:
  46.             ''--------------------
  47.             '.upQueryString=request.queryString("id") '目标查询 ID [必选项]
  48.             '.upCharSet="utf-8" '页面编码 [必选项], 请正确设置页面编码! 
  49.             ''---------------------------------------
  50.             '' 上传文件各参数设置:
  51.             ''--------------------
  52.             '.upBinaryTotal=cLng(request.TotalBytes) '读取二进制字节长度  [必选项]
  53.             '.upPath="/saveimg/" ' 默认存放路径 [必选项]
  54.             '.upOverWrite=2 ' 上传文件是否覆盖原有文件设置. 1 或空为不覆盖, 2 为覆盖, 默认为 1 [非必选]
  55.             ''---------------------------------------
  56.             '' 表单域默认值:
  57.             ''--------------------
  58.             '' 提交表单目标地址, 处理上传操作 ID值必须为 upfile, 如 ?xxx=upfile [必选项]
  59.             '.upAction="?id=upfile" 
  60.             '.upNumber= 5 ' 显示上传文件 文件框 数量. 最小为1, 最大为 99, 默认为 1 [非必选]
  61.             '.fileNamePrefix="前缀" ' 自定义文件名前缀, 不想加前缀, 注释掉此项 [非必选]
  62.             '.fileNamePostfix=1 ' 是否添加随机后缀, 空值不添加, 注释掉此项 [非必选]
  63.             ''---------------------------------------
  64.             '.pgUpFile ' 处理上传文件操作 [必选项]
  65.             '.pgUpForm ' 上传文件表单域 [必选项]
  66.             ''---------------------------------------
  67.             '' 文件上传操作相关信息:
  68.             '' response.write join(.upFilePathArray,"<br/>") ' 存储所有文件路径的数组 [非必选]
  69.             '.pgUploadInfo ' 表单域内容相关信息及已上传文件相关信息 [非必选]
  70.             ''.pgShowImage ' 显示已上传的图片文件 [非必选]
  71.             
  72.             '.info ' 功能信息 [非必选]
  73.             '.auther ' 作者及版本信息 [非必选]
  74.         'end with
  75.     'set upload=nothing    
  76.     '-----------------------------------------------------------------------------------------------
  77.     ' 附: 
  78.     ' 1. 添加单引号(')的 正则: 查找: ^(.*?)([/S]) 替换: $1'$2
  79.     ' 2. 移除单引号(')的 正则: 查找: ^(.*?)/' 替换: $1
  80.     '-----------------------------------------------------------------------------------------------
  81.         public sub class_initialize()
  82.             upShowImageExtension=".jpg|.gif|.png|.jpeg|.bmp"
  83.         end sub
  84.         public sub class_terminate()
  85.         end sub
  86.         
  87.         public sub header()
  88.             response.write "<div style=""text-align:center;display:table;width:100%;color:red;font-size:28px;"">"
  89.             response.write "shawl.qiu ASP 无组件上传类 1.0 Beta 版"
  90.             response.write "</div>"
  91.         end sub
  92.         public sub info()
  93.             response.write "<xmp>"
  94.             response.write "shawl.qiu ASP 无组件上传类 1.0 Beta 版"&vbcrlf&vbcrlf
  95.             response.write "主要功能:"&vbcrlf
  96.             response.write "支持自定义上传N个文件"&vbcrlf
  97.             response.write "支持自定义文件名前缀"&vbcrlf
  98.             response.write "支持随机自定义文件名后缀"&vbcrlf
  99.             response.write "支持任何编码的中文文件名"&vbcrlf
  100.             response.write "支持自定义上传文件框个数"&vbcrlf&vbcrlf
  101.             response.write "说明:"&vbcrlf
  102.             response.write "为了方便使用, 把表单域也封装进class(类)"&vbcrlf&vbcrlf
  103.             response.write "后续版本待加功能:"&vbcrlf
  104.             response.write "增加文件上传总大小限制"&vbcrlf
  105.             response.write "增加单个文件总大小限制"&vbcrlf
  106.             response.write "增加自定义允许上传的文件类型"&vbcrlf
  107.             response.write "增加检测特定文件类型包含恶意代码的功能"&vbcrlf
  108.             response.write "</xmp>"
  109.         end sub
  110.         
  111.         public sub auther()
  112.             response.write "<xmp>"
  113.             response.write "Subject: shawl.qiu ASP 无组件上传类 1.0 Beta 版"&vbcrlf&vbcrlf
  114.             response.write "Author: shawl.qiu"&vbcrlf
  115.             response.write "Version: 1.0 Beta"&vbcrlf
  116.             response.write "Date: 2006-09-27"&vbcrlf
  117.             response.write "Blog:   http://blog.youkuaiyun.com/btbtd"&vbcrlf
  118.             response.write "E-Mail: shawl.qiu@gmail.com"
  119.             response.write "</xmp>"
  120.         end sub
  121.         
  122.         public upQueryString, upCharSet
  123.         public upAction, upNumber, fileNamePrefix, fileNamePostfix
  124.         public upPath, upOverWrite, upBinaryTotal
  125.         public upFilePathArray
  126.         
  127.         private upTotalFiled, upAvailableField, upFileUploaded
  128.         private upSourceNameArray, upRenamedArray
  129.         private upShowImageExtension
  130.         
  131.         public property get pgUploadInfo
  132.             if upFileUploaded="" then upFileUploaded=0
  133.             response.write "<xmp>"
  134.             response.write "表单域共有 "&upTotalFiled&"个 Field, "
  135.             response.write "可用 Field "&upAvailableField&"个, "
  136.             response.write "已上传文件数 "&upFileUploaded&"个. "
  137.             if upFileUploaded>0 then
  138.                 response.write vbCrlf&vbCrlf
  139.                 dim i
  140.                 for i=0 to upFileUploaded-1
  141.                     response.write "文件 "&i+1&" 原文件名:"&upSourceNameArray(i)&vbCrLf
  142.                     response.write "最终文件名:"&upRenamedArray(i)&vbCrLf
  143.                     response.write "路径:"&upFilePathArray(i)
  144.                     response.write vbCrLf&vbCrLf
  145.                 next
  146.             end if
  147.             response.write "</xmp>"
  148.             pgUploadInfo=pgUploadInfo
  149.         end property
  150.         
  151.         public property get pgUpFile
  152.             pgUpFile=fOperate(upBinaryTotal)
  153.         end property
  154.         
  155.         public property get pgUpForm
  156.             pgUpForm=upForm(upAction, upNumber, fileNamePrefix, fileNamePostfix) 
  157.         end property 
  158.         
  159.         public property get pgShowImage
  160.             pgShowImage=upShowImage(upShowImageExtension, upFilePathArray) 
  161.         end property 
  162.         
  163.         private function upShowImage(extension, filepath_)
  164.             if not isArray(upFilePathArray) then exit function
  165.             dim extAr:extAr=split(extension,"|")
  166.             dim temp, temp_
  167.             for each temp in upFilePathArray
  168.                 for each temp_ in extAr
  169.                     if strComp(mid(temp,inStrRev(temp,".")),temp_,1)=0 then
  170.                         response.write "<a href="""
  171.                         response.write temp
  172.                         response.write """ target=""_blank""><img src="""
  173.                         response.write temp
  174.                         response.write """ alt=""shawl.qiu upload"" title=""shawl.qiu upload""/></a>"
  175.                     end if
  176.                 next
  177.             next
  178.         end function
  179.         
  180.         private function fOperate(upBinaryTotal)
  181.             if upQueryString<>"upfile" or upAction="" then exit function
  182.             
  183.             if upOverWrite="" then upOverWrite=1
  184.             if upOverWrite<1 or upOverWrite>2 then upOverWrite=1
  185.             
  186.             dim lf:lf=chrB(13)&chrB(10) 
  187.             dim bRead ' 读取二进制流内容
  188.                 bRead=request.BinaryRead(upBinaryTotal)
  189.                         
  190.             dim fieldMarker ' 定义取二进制流 Field 分隔标记 (内容为二进制)
  191.                 fieldMarker=leftB(bRead,inStrB(bRead,chrB(13))-1)
  192.                 
  193.             dim headerMarker:headerMarker=leftB(bRead,instrB(bRead,chrB(32))-1)
  194.             
  195.             dim temp:temp=1
  196.             dim temp_
  197.             
  198.             dim temp1
  199.             dim temp1_
  200.             
  201.             dim headerTotal
  202.             dim headerAvailable:headerAvailable=0
  203.             
  204.             dim headerStartPsti, headerEndPsti, headerStr
  205.             
  206.             dim fieldStartPsti, fieldEndPsti
  207.             
  208.             dim fnPrefix, fnPostfix
  209.             do
  210.                 temp_=inStrB(temp, bRead, headerMarker)
  211.                 if temp_<>0 then
  212.                     temp=temp_+1
  213.                     
  214.                     temp1=inStrB(temp, bRead, lf&lf)
  215.                     temp1_=inStrB(temp1+5, bRead, fieldMarker)
  216.                     headerTotal=headerTotal+1
  217.     
  218.                     if inStrB(midB(bRead, temp1+4, 36),midB(fieldMarker,1))=0 then
  219.                         if isArray(headerStartPsti) then redim preserve headerStartPsti(headerAvailable) _
  220.                         else redim headerStartPsti(headerAvailable)
  221.                             headerStartPsti(headerAvailable)=temp-1
  222.                             
  223.                         if isArray(headerEndPsti) then redim preserve headerEndPsti(headerAvailable) else _
  224.                         redim headerEndPsti(headerAvailable)
  225.                             headerEndPsti(headerAvailable)=temp1+2-temp
  226.                         
  227.                         if isArray(headerStr) then redim preserve headerStr(headerAvailable) else redim _
  228.                          headerStr(headerAvailable)
  229.                          
  230.                         headerStr(headerAvailable)=fBin2Str(midB(bRead,temp-1,temp1+2-temp),upCharSet)
  231.                         
  232.                         if isArray(fieldStartPsti) then redim preserve fieldStartPsti(headerAvailable) else redim  fieldStartPsti(headerAvailable)
  233.                         fieldStartPsti(headerAvailable)=temp1
  234.                         
  235.                         if isArray(fieldEndPsti) then redim preserve fieldEndPsti(headerAvailable) else redim  fieldEndPsti(headerAvailable)
  236.                         fieldEndPsti(headerAvailable)=temp1_
  237.                         
  238.                         if inStr(headerStr(headerAvailable),"filename")=0 and inStr(headerStr(headerAvailable),"; name=")<>0 then
  239.                             select case fRegExpSgl(headerStr(headerAvailable),true,true,true,"[/s/S]*?name/=/""(.*?)""[/s/S]*","$1")
  240.                                 case "fnPrefix"
  241.                                     if upCharSet="gb2312" then
  242.                                         fnPrefix=bTsGb2312(midB(bRead,temp1,temp1_-temp1))
  243.                                     else
  244.                                         fnPrefix=fBin2Str(midB(bRead,temp1,temp1_-temp1), upCharSet)
  245.                                     end if
  246.                                 case "fnPostfix"
  247.                                     if upCharSet="gb2312" then
  248.                                         fnPostfix=bTsGb2312(midB(bRead,temp1,temp1_-temp1))
  249.                                     else
  250.                                         fnPostfix=fBin2Str(midB(bRead,temp1,temp1_-temp1), upCharSet)
  251.                                     end if
  252.                             end select
  253.                         end if
  254.                             headerAvailable=headerAvailable+1
  255.                     end if
  256.                 else
  257.                     exit do
  258.                 end if
  259.             loop    
  260.             
  261.             upTotalFiled=headerTotal
  262.             upAvailableField=headerAvailable
  263.             
  264.             dim fileName, fileNamePrx, fileNamePox
  265.             dim i
  266.             for i=0 to uBound(headerStr)
  267.                 if inStr(headerStr(i),"filename=")<>0 then
  268.                     fileName=fRegExpSgl(headerStr(i),true,true,true,"[/s/S]*filename/=""(.*?)""[/s/S]*","$1")
  269.                     
  270.                     if isArray(upSourceNameArray) then redim preserve upSourceNameArray(i) else redim  upSourceNameArray(i) 
  271.                     upSourceNameArray(i)=fileName
  272.                     
  273.                     fileNamePrx=fRegExpSgl(fileName,true,true,true,"(.*?)/..*","$1")
  274.                     fileNamePox=fRegExpSgl(fileName,true,true,true,".*(/..*)","$1")
  275.                     if fnPrefix<>"" then fileNamePrx=fnPrefix&fileNamePrx
  276.                     if fnPostfix<>"" then fileNamePrx=fileNamePrx&fGuid
  277.                     fileName=fileNamePrx&fileNamePox
  278.                     fileName=fRegExpSgl(fileName,true,true,true,"[/s]+","")
  279.                     
  280.                     if isArray(upRenamedArray) then redim preserve upRenamedArray(i) else redim  upRenamedArray(i) 
  281.                     upRenamedArray(i)=fileName
  282.                     
  283.                     if isArray(upFilePathArray) then redim preserve upFilePathArray(i) else redim  upFilePathArray(i) 
  284.                     upFilePathArray(i)=upPath&fileName
  285.                     
  286.                     call fBinSv2fl(bRead,fieldStartPsti(i)+3,fieldEndPsti(i)-fieldStartPsti(i)-3, upPath&fileName, upOverWrite)
  287.                     upFileUploaded=upFileUploaded+1
  288.                     
  289.                 end if
  290.             next    
  291.         end function
  292.         private function fBinSv2fl(bin, bStart, bEnd, filepath_, ovWrite)
  293.         '''''''''''''''''''''''''''''
  294.         ' 截取二进制流保存为文件 By shawl.qiu
  295.         '   http://blog.youkuaiyun.com/btbtd
  296.         ''''''''''''''''
  297.         ' sample call: call fBinSv2fl(bRead,fieldStartPsti(i)+3,fieldEndPsti(i)-fieldStartPsti(i)-3, fileName, 2)
  298.         ''''''''''
  299.         ' 参数说明
  300.         ''''''''''
  301.         ' bin: 源二进制流
  302.         ' bStart: 截取二进制流的起始位置
  303.         ' bEnd: 截取二进制流的结束位置
  304.         ' filepath_: 保存文件的路径
  305.         ' ovWrite: 是否覆盖原有文件. 1: 不覆盖; 2. 覆盖
  306.         '''''''''''''''''''''''''''''
  307.                 filepath_=server.MapPath(filepath_)
  308.             dim stm_, fromStm_ 
  309.             set stm_=createObject("adodb.stream")
  310.                 stm_.type=1 
  311.                 stm_.mode=3 
  312.                 stm_.open
  313.                 stm_.write bin 
  314.                 set fromStm_=createOBject("adodb.stream")
  315.                     with fromStm_
  316.                         .type=1
  317.                         .mode=3
  318.                         .open
  319.                         stm_.position = bStart 
  320.                         stm_.copyTo fromStm_, bEnd 
  321.                         .saveTofile filepath_, ovWrite
  322.                         .close
  323.                     end with
  324.                 set fromStm_=nothing
  325.                 stm_.close  'shawl.qiu code'
  326.             set stm_=nothing
  327.         end function
  328.     
  329.         private function fStr2Bin(str, charSet)
  330.         '''''''''''''''''''''''''''''
  331.         ' 字符串转二进制函数 By shawl.qiu
  332.         '   http://blog.youkuaiyun.com/btbtd
  333.         ''''''''''''''''
  334.         ' 参数说明
  335.         ''''''''''
  336.         ' str: 要转换成二进制的字符串
  337.         ' charSet: 字符串默认编码集, 如不指定, 则默认为 gb2312
  338.         ''''''''''
  339.         ' sample call: response.binaryWrite fStr2Bin(str, "utf-8")
  340.         '''''''''''''''''''''''''''''
  341.             dim stm_ 
  342.             set stm_=createObject("adodb.stream")
  343.                 with stm_
  344.                     .type=2 
  345.                     if charSet<>"" then
  346.                         .charSet=charSet
  347.                     else
  348.                         .charSet="gb2312"
  349.                     end if
  350.                     .open
  351.                     .writeText str
  352.                     .Position = 0
  353.                     .type=1
  354.                     fStr2Bin=.Read
  355.                     .close
  356.                 end with 'shawl.qiu code'
  357.             set stm_=nothing
  358.         end function
  359.         
  360.         private function fBin2Str(str, charSet)
  361.         '--------------------------------------
  362.         ' 二进制转字符串函数 By shawl.qiu
  363.         '   http://blog.youkuaiyun.com/btbtd
  364.         '--------------------------
  365.         ' 参数说明:
  366.         '----------
  367.         ' str: 要转换成字符串的二进制数据
  368.         ' charSet: 字符串默认编码集, 如不指定, 则默认为 gb2312
  369.         '-------------
  370.         ' sample call: response.write fBin2Str(midB(fStr2Bin(str, "utf-8"),1),"utf-8")
  371.         '--------------------------------------
  372.         ' 注意: 二进制字符串必须先用 midB(binaryString,1) 读取(可自定读取长度).
  373.         '--------------------------------------
  374.             dim stm_ 
  375.             set stm_=createObject("adodb.stream")
  376.                 with stm_
  377.                     .type=2 
  378.                     .open
  379.                     .writeText str
  380.                     .Position = 0
  381.                     if charSet<>"" then
  382.                         .CharSet = charSet
  383.                     else 
  384.                         .CharSet = "gb2312"
  385.                     end if
  386.                         fBin2Str=.ReadText
  387.                     .close
  388.                 end with 'shawl.qiu code'
  389.             set stm_=nothing
  390.         end function
  391.         
  392.        private function bTsGb2312(bin)
  393.         '二进制转为 string | gb2312 编码
  394.             dim i, iByt, sByt, bLen:bLen=lenB(bin)
  395.             for i=1 to bLen
  396.                 sByt=midB(bin,i,1):iByt=ascB(sByt)
  397.                 if iByt<128 then
  398.                     bTsGb2312=bTsGb2312&chr(iByt)
  399.                 else
  400.                     bTsGb2312=bTsGb2312&chr(ascW(midB(bin,i+1,1)&sByt))
  401.                     i=i+1
  402.                 end if
  403.             next 'shawl.qiu code'
  404.         end function
  405.         
  406.         private function fRegExpSgl(str,glb,igc,mtl,pt,rpt)
  407.             dim re
  408.             set re=new RegExp
  409.                 re.global=glb
  410.                 re.ignoreCase=igc
  411.                 re.multiline=mtl
  412.                 
  413.                 re.pattern=pt
  414.                 fRegExpSgl=re.replace(str,rpt)
  415.             set re=nothing
  416.         end function 'shawl.qiu code'
  417.         private function fGuid
  418.                 fGuid=mid(cstr(createObject("scriptlet.typeLib").GUID),2,36)
  419.         end function 'shawl.qiu code'
  420.         
  421.         private function upForm(upAction, upNumber, fileNamePrefix, fileNamePostfix) 
  422.         '-------------------------------------------
  423.         ' shalw.qiu ASP 无组件上传类, 表单域
  424.         '-------------------------------------------
  425.         ' sample call: call upForm("?id=test", 5, "文件前缀", "")
  426.         '----------------------------------------------------------
  427.             if upNumber="" then upNumber=1
  428.             if upNumber<1 or upNumber>99 then upNumber=5
  429.             if fileNamePostfix<>"" then fileNamePostfix=" checked=""checked"" "
  430.             dim i_    
  431.                 response.write "<form action="""&upAction&""" method=""post"" enctype=""multipart/form-data"" name=""upForm"" id=""upForm"">"
  432.             for i_=1 to upNumber  
  433.                 response.write "<div class=""upBrowser""><input type=""file"" name=""file"" class=""upButton"" /> </div>"
  434.             next
  435.             response.write  "<div class=""upPrefix"">自定义前缀: <input name=""fnPrefix"" type=""text"" value="""&fileNamePrefix&""" class=""upPrefixButton""/></div>"
  436.              response.write "<div class=""upPostfix"">添加随机后缀: <input name=""fnPostfix"" type=""checkbox"" value=""checkbox"""& fileNamePostfix&"class=""upPostfixButton"" /> </div>"
  437.             response.write " <input type=""submit"" value=""Submit"" class=""upSubmit"" />"
  438.             response.write "</form>"
  439.         end function 
  440.     end class
  441. %>
  442. <a href="?">back</a>

2. 上传预览
shawl.qiu ASP 无组件上传类 1.0 Beta 版
自定义前缀:
添加随机后缀:
      表单域共有 7个 Field, 可用 Field 5个, 已上传文件数 3个. 文件 1 原文件名:E-Studio001(44).jpg 最终文件名:前缀E-Studio001(44)33C326FB-51D2-4933-AED0-1EC744B2A2C0.jpg 路径:/saveimg/前缀E-Studio001(44)33C326FB-51D2-4933-AED0-1EC744B2A2C0.jpg 文件 2 原文件名:E-Studio001(55).jpg 最终文件名:前缀E-Studio001(55)72F24F09-B280-4B79-8CD6-3EAB80C44CAA.jpg 路径:/saveimg/前缀E-Studio001(55)72F24F09-B280-4B79-8CD6-3EAB80C44CAA.jpg 文件 3 原文件名:E-Studio001(52).jpg 最终文件名:前缀E-Studio001(52)CF951352-0AD3-42EA-BA84-F8A30E88DEBE.jpg 路径:/saveimg/前缀E-Studio001(52)CF951352-0AD3-42EA-BA84-F8A30E88DEBE.jpg 
     
      shawl.qiu ASP 无组件上传类 1.0 Beta 版 主要功能: 支持自定义上传N个文件 支持自定义文件名前缀 支持随机自定义文件名后缀 支持任何编码的中文文件名 支持自定义上传文件框个数 说明: 为了方便使用, 把表单域也封装进class(类) 后续版本待加功能: 增加文件上传总大小限制 增加单个文件总大小限制 增加自定义允许上传的文件类型 增加检测特定文件类型包含恶意代码的功能 
     
      Subject: shawl.qiu ASP 无组件上传类 1.0 Beta 版 Author: shawl.qiu Version: 1.0 Beta Date: 2006-09-27 Blog: http://blog.youkuaiyun.com/btbtd E-Mail: shawl.qiu@gmail.com
     
back


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值