Discussion Locked

upload file

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
how can i uploaad file from browser to server using asp?if there is a way without buying components it'll be better.

5 replies

by fgarber

Here's the code to upload a file using cpshost and asp. It's all free.
I have to code to handle the file after it gets to the server but i will have to email it to you.
<%@ Language=VBScript %>
<%

Option Explicit
Dim strServerURL
Dim strTargetURL
Dim strRepostURL
Dim strPathToPA
Dim strPostingURL

strServerURL = "http://" + Request.ServerVariables("SERVER_NAME")
strTargetURL = strServerURL & "/yourdirectory"
strRepostURL = "http://" + Request.ServerVariables("SERVER_NAME") & "/xferfinish.asp"
strPathToPA = strServerURL & "/Scripts/cpshost.dll"
strPostingURL = strPathToPA + "?PUBLISH?" + strRepostURL
%>

This discussion is closed to new replies.