HighDots Forums  

Asp vb upload problem - MapPath?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Asp vb upload problem - MapPath? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ConorS
 
Posts: n/a

Default Asp vb upload problem - MapPath? - 07-21-2004 , 07:10 AM






Hi

I had the following piece of code which uploads a file to my site. The hosting
company has made a change to the server and now upload doesn't work.

Heres my code:

<%
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.Save "e:/domains/fmenvironmental.co.uk/user/htdocs/Uploads/images"

For Each File in Upload.Files
pdf = File.ExtractFileName
Next
%>

The web site is www.fmenvironmental.co.uk
I contacted the hosting comany and he suggests the following "use a server
MapPath option as this will work no matter how the hosting environment changes"

In as little moves as possible, can this be fixed in the change of a line? Or
how do i include MapPath into this code to make this work?


Reply With Quote
  #2  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Asp vb upload problem - MapPath? - 07-21-2004 , 10:02 AM






Try

Upload.Save Server.MapPath( "/Uploads/images" )

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Reply With Quote
  #3  
Old   
Jim Deitzel
 
Posts: n/a

Default Re: Asp vb upload problem - MapPath? - 07-22-2004 , 08:16 AM



Try using this. Got the code from www.aspupload.com

<%
Set Upload = Server.CreateObject("Persits.Upload.1")

Upload.OverwriteFiles = True
On Error Resume Next

Upload.SetMaxSize 1004857600 ' Limit files to 1MB
Upload.SaveVirtual "../pdfs"
%>


The Upload.SaveVirtual will do what you need to do.

Jim

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.