| | |
|
|
|
Asp vb upload problem - MapPath? |
| message from ConorS on 21 Jul 2004 |
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?
|
| Jim Deitzel replied to ConorS on 22 Jul 2004 |
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
|
| Julian Roberts replied to ConorS on 21 Jul 2004 |
Try
Upload.Save Server.MapPath( "/Uploads/images" )
|
| ConorS replied to ConorS on 21 Jul 2004 |
anyone?
|
|
Archived message: Asp vb upload problem - MapPath? (Macromedia Dreamweaver)