Find jobs - Reference And Education Articles - Submit articles - Manga - Travel news

PDA

View Full Version : ASP upload file problem


angelran
Sep 27th 2005, 12:39 am
Hi Guys,
i've downloaded some ASP code which can upload files and it can insert file name, size to the database. also it allows you to specify the database path and upload folder path. Now i want to add a textarea in the form and can the file introduction form user, then instert it to the database when file is uploaded. but the problem is i cannot get value from the textarea and it always the blank in the database. i upload the zip file, some one can give me a hand??

cheers

p.s. i've add a data field in datas.mdb called intro, and i write
dim file_intro
file_intro=request.Form("intro")
try to get the value from the textarea(name intro)
this code is placed at the beginning of uploadScript.asp file

JamieC
Oct 19th 2005, 2:02 am
Forms in ASP do strange things when you're uploading binary data.

First thing I would say is try to retrieve the ascii data FIRST - before unleashing your downloaded code on the rest of the form.

If you have the ability to install components on your server, I would recommend you take a look at ASP Upload (http://www.aspupload.com/), which is the component I use. This component has its own properties which allow you to access the text elements of the form as well as the binary data.

stueym
Oct 21st 2005, 1:10 pm
Have you tried the asp upload component from persits software it makes uploading files and images a breeze! Just a few lines of code

Zinho
Oct 28th 2005, 1:25 pm
Make sure in the form tag there's the right enctype:
<form action="submit.asp" method="POST" ENCTYPE="multipart/form-data">

Hope this helps