Data | Database First, the type of your form is set to <form enctype= "Multipart/form-data"
action= "Uploadresult.asp" method=post>
Please choose a picture to upload:
<input name= "Picture" Type=file accept= "image/*" >
<input name= "Text1" Type=text >
</form>
Then the next page, separated by the way to separate the text, at this time can not use Request.Form, should be changed to
FormData = Request.BinaryRead (formsize)
Formsize = Request.TotalBytes
Bncrlf = ChrB (+) & ChrB (10)
Divider = LEFTB (FormData, INSTRB (FormData, Bncrlf)-1)
Datastart = INSTRB (FormData, Bncrlf & Bncrlf) + 4
Dataend = INSTRB (Datastart + 1, FormData, divider)-Datastart
Response.ContentType = "Image/gif"
Response.BinaryWrite MIDB (FormData, Datastart, Dataend)
Here, the image is the first.
Then convert the binary to text. (See Jinhua area)
Find the size.
Formsize = Request.TotalBytes
The total size is then subtracted from the size just obtained. Gets the text size. A string function is then used to derive its value.
Finally, the database exists separately.
Note that this method cannot complete a save as file. Because the file objects in VBScript cannot handle binary formats. (Image of the binary)
But VB can, so we can already use components to complete the above work.
I use my own components, so that I can finish saving as a database, and I can save bits of files. You can also limit size, file type (Gif,jpg,htm,exe), and so on, but the code of thought is still the code above. If you need, you can contact me.