troubleshooting Question

Object not supported error on SmartUpload filename retrieval

Avatar of Gerano
GeranoFlag for South Africa asked on
ASPVB Script
6 Comments1 Solution491 ViewsLast Modified:
I'm using ASP AmartUpload to upload files to a folder which works fine. I'm aso successful in retrieving other form data using uploadObj.form.

However, when using uploadObj.files to retrieve the filenames to I can write them to the database I get an error that states: Object doesn't support this property or method. All the material I've read states that it's .files but it clearly doesn't work.
Variables have been checked, all are valid and declared.

Here is the code:
Note that I'm not doing the response.redirect yet as I first want to get the filenames written to the page to verify they are there.

<% @Language = VBScript %>
<% Option Explicit %>

<% Dim intID, vchThumbnail, vchImage, uploadObj

        'Create an instance of our SmartUpload object.
        Set uploadObj = Server.CreateObject("aspSmartUpload.SmartUpload")

            'Set allowed files
            uploadObj.AllowedFilesList = "jpg, gif"

        'Process the upload

        'Save the file
        uploadObj.Save Server.MapPath("../Media/ProductImages/")

intID = uploadObj.Form("intID")
vchThumbnail  = uploadObj.files("vchThumbnail")
vchImage  = uploadObj.files("vchImage")
<%'Response.Redirect "EditProduct.asp?intID="&intID&"&vchThumbnail='"&vchThumbnail&"'&vchImage='"&vchImage&"'"    
      <% =  intID%><br>
      <% = vchThumbnail %><br>
      <% = vchImage %><br>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros