Forum Moderators: open
I am developing a website where people will be able to upload files to their own sub folder on the server to be downloaded by other users. However, this is turning out to be the worst 2 days of my life, yes thats how long I have been fighting this thing for!
Right am going to include the code for both pages and I need to see if anyone can see why it does not work, orwhat I am missing.
Form
----
<form id="upload" name="upload" method="POST" action="li_resources_head.asp" enctype="application/x-www-form-urlencoded">
File to upload<input type="file" name="filename" />
<input type="submit" name="Submit" value="Uload" />
</form>
uid = Session("SysUserLoginName")
fup = request.Form("filename")
response.Expires = 0
Set fbase = Server.CreateObject("Chili.Upload.1")
fbase.SizeLimit = 100000
fbase.SaveToFile(server.MapPath("../businessballs/" & uid & "/" & fup))
The error I get is:
Chili.Upload.1 (0x80004005)
Form does not contain a file element.
/businessballs/li_resources_head.asp, line 33
This is starting to drive me insane!
I am probably missing something sooooo obvious, but after staring at this code for nearly 2 days I'm not surprised!
Thanks in advance (and please make answers simple, I'm too tired to try and understand anything complicated LOL! :> )
Add ENCTYPE="multipart/form-data" to the form, and have a good read of the upload components documentation on how to do it,as they are all different.
fup = request.Form("filename")
With the one I use, this wont work. you have to do this insead:
objUploader=New Uploader()
fup = objUploader.Upload("filename)