Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload files in asp

Status
Not open for further replies.

printline

Technical User
Jul 10, 2006
5
DK
Hello out there!

I have a problem when uploading files via ASP.

I have an ISP which uses the SAFileUP-component to upload files. Now as default the uploaded file gets uploaded on their server.

Can anyone tell me if it is possible to get the uploaded file to be uploaded somewhere else, for example to my local machine or to my own server....

Here is the code i am using:

<% @ LANGUAGE = VBSCRIPT %>
<html>
<body>
<%
set upl = Server.CreateObject("SoftArtisans.FileUp")

' name the path, the file should be placed in
' - here is used the actual path (.)
upl.Path = Server.MapPath(".")

if (upl.IsEmpty) then
Response.write "<p>error: file is empty or do not exist
!</p>"
elseif (upl.ContentDisposition <> "form-data") then
Response.write "<p>error: Upload failed!</p>"
else
Response.write "<p>file is now uploaded.</p>"
on error resume next
' save the uploaded file on the isp server
upl.Save
end if
%>
</body>
</html>
 
No, because the SAfileup is sitting on your host server.

However, you could write a snazzy bit of script that emails the file to you after it is uploaded and then deletes it (if you want).

Steve Davis

NOTE: This sig does not include any reference to voting, stars, or marking posts as helpful as doing so is cause for membership termination.
 
Damn....

Do you know of any other method to upload files in asp, so i upload the files to somewhere else than on my isp's server..............?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top