Replies Back to Article
ASP upload on Unix/Linux Servers
i've been trying this for a couple of months and finaly got the chiliupload component to work properly, try this:
here's the upload form page:
<html>
<body>
<h1>Send file</h1>
<FORM ACTION="fileupld.asp" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="FILE" NAME="FILE">
<INPUT TYPE="SUBMIT" VALUE="Send">
</FORM>
</body>
</html>
Here's the upload script, put it on a file named fileupld.asp
<%
Response.Expires = 0
Set fbase = Server.CreateObject("Chili.Upload.1")
dim strSentence, arrWords, strOneWord, element
strSentence = fbase.SourceFileName
strSentence = Trim(strSentence)
arrWords = Split (strSentence, "\", -1, 1)
element = UBound(arrWords)
Response.Write("Element = ")
Response.Write(element)
Response.Write("<BR>")
Response.Write(arrWords(element))
Response.Write("<BR>")
fbase.SizeLimit = 100000
fbase.SaveToFile("/full_path_to_your_site_from_the_server_root/directory_to_upload_files/" & arrWords(element))
%>
hope it helps