Re: Object required: 'jfile'

  •  04-30-2010, 2:37 PM

    Re: Object required: 'jfile'

    Please use the following code,

    <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    <body>
     <div class="demo">                       
            <h2>Selecting multiple files for upload</h2>
      <p>ASP Uploader allows you to select multiple files and upload multiple files at once.</p>
     
       <!-- do not need enctype="multipart/form-data" -->
       <form id="form1" method="POST">
       <%
       Dim uploader
       Set uploader=new AspUploader
       uploader.MaxSizeKB=10240
       uploader.Name="myuploader"
       uploader.InsertText="Upload File (Max 10M)"
       uploader.MultipleFilesUpload=true
       //uploader.SaveDirectory= Server.MapPath("../../clientes") 
       uploader.AllowedFileExtensions="*.jpg,*.png,*.gif"  
       'uploader.Render()
       'uploader.GetString()
       %>
       <%=uploader.Render()%>
       </form>
      
       <br/><br/>
    <%

    If Request.Form("myuploader")&""<>"" Then

     Dim list,i
     list=Split(Request.Form("myuploader"),"/")

     For i=0 to Ubound(list)
      if i>0 then
       Response.Write("<hr/>")
      end if
      Dim mvcfile
    '  response.write "teste:&nbsp;" & list(i)
      Set mvcfile=uploader.GetUploadedFile(list(i))
      targetfilepath= "clientes/" & mvcfile.FileName    
      mvcfile.CopyTo(server.mappath(targetfilepath))   
      Response.Write("<br/>FileName : ")
      Response.Write(mvcfile.FileName)
     Next
    End If

    %>
      
     </div>
    </body>
     
    Regards,
    Eric
View Complete Thread