Help getting script to use GetUploadedFile when using 2 ASP files...

  •  09-23-2016, 11:45 AM

    Help getting script to use GetUploadedFile when using 2 ASP files...

    Is there a way to break this down in to 2 files, so I can use the second file will move the file and process some database entries?  I'm getting an error on the GetUploadedFile line.  It works as one file, but when I split it up in to 2 files, it fails.

     

             <h2>Single File Upload</h2> 
            <p>A basic sample demonstrating the use of the Upload control.</p> 

            <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

                response.write (uploader.GetString())  
      %>
     
            </form>

            <br/><br/> 

    <%
    targetfile = "myphoto1.jpg"

    If Request.Form("myuploader")&""<>"" Then 
      Dim mvcfile 
         Set mvcfile=uploader.GetUploadedFile(Request.Form("myuploader")) 
        mvcfile.MoveTo(targetfile)
    End If
     
    %>

View Complete Thread