Hi,
I downloaded aspsmartupload in order to let the visitors of my site upload
files (their picture in jpg). It works perfect.
But in fact, i need to collect not only their picture, but also name,
address etc ...
So i combined both input types in one form like this:
<FORM METHOD="POST" ACTION="testuploadb2.asp" ENCTYPE="multipart/form-data">
INPUT TYPE="text" NAME="name" >
...
<INPUT TYPE="FILE" NAME="FILE1" >
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>
The ASP code is:
'----------------
Dim mySmartUpload
lol="kevin"
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload
For each file In mySmartUpload.Files
If not file.IsMissing Then
file.SaveAs("/Uploadjpg/" & lol & ".jpg")
end if
next
'-----------------------------
name=request.form("name")
....
But it doesn't work! (http 500 internal server error)
Any idea how to solve this?
Thanks
Ray Costanzo [MVP] - 21 Oct 2005 21:13 GMT
First of all, make it so that you can actually see your errors:
http://www.aspfaq.com/show.asp?id=2109
Secondly, this isn't really a database problem.
You have to use the upload object's collection of form data to get to the
form data. Look in the sample code for your component, and this will
probably be explained. You'll have to do something LIKE (I DON'T KNOW THE
EXACT WORDING FOR THIS COMPONENT)
Someformvalue = YourUploadObject.Form("nameofinput")
Ray at work
> Hi,
>
[quoted text clipped - 29 lines]
> Any idea how to solve this?
> Thanks
Kevin - 21 Oct 2005 22:39 GMT
Thanks a lot. It works now ...
> First of all, make it so that you can actually see your errors:
> http://www.aspfaq.com/show.asp?id=2109
[quoted text clipped - 43 lines]
> > Any idea how to solve this?
> > Thanks