Uploading Script Component (need good example)

Results 1 to 2 of 2

Thread: Uploading Script Component (need good example)

  1. #1
    Join Date
    Dec 1969

    Default Uploading Script Component (need good example)

    I got this File-Uploading Windows Script Component here on 4guys and want to be able to change the Folder that the file uploads to. I need a Good Layman&#039;s Example of exactly What code needs to go Where. If you could leave an email in case I still don&#039;t understand that would be great. The code below is what I have in my ASP page. Any help would be appreciated, Thanks...<BR><BR>&#060;%@ Language=VBScript %&#062; <BR>&#060;% Option Explicit %&#062; <BR>&#060;% response.buffer=true %&#062; <BR>&#060;% <BR>Dim MBRequest <BR>Dim strPath <BR>strPath = "script:" & Server.MapPath("MetaBuilders.FileUp.wsc") <BR>&#039;Response.Write strPath <BR>&#039;Response.End <BR>set MBRequest = GetObject( strPath ) <BR><BR>If MBRequest("submit") = "upload" then <BR>Response.Write "You Uploaded: " & MBRequest("File1").Path & MBRequest("File1").FileName & " <BR>" & vbNewLine <BR>Response.Write "The Extension Is: " & MBRequest("File1").Extension & " <BR>" & vbNewLine <BR>Response.Write "The MIME/ContentType Is: " & MBRequest("File1").ContentType <BR><BR>&#039;Save the uploaded file to the directory this ASP script resides in <BR> MBRequest("File1").Save <BR><BR>end if <BR>%&#062; <BR>

  2. #2
    Maurice Walshe Guest

    Default RE: Uploading Script Component (need good example)

    HI below is a short example of how i use the componant<BR>docs is an array conatining the names of the file fields <BR>on the form.<BR> <BR>&#039;<BR>&#039; --- now save the files to there new home !<BR>&#039; <BR> MBRequest(docs(i,1)).OverWrite = TRUE<BR> MBRequest(docs(i,1)).SavePath = strBasePath & rs_type("Home")<BR> MBRequest(docs(i,1)).SaveAs (strFname)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts