<%
Public Function builduploadrequest (strrequestbin)
Dim Posbeg, Posend, boundary, Boundarypos
' Get the boundary
Posbeg = 1
Posend = InstrB (posbeg,strrequestbin,getbytestring (Chr (13)))
Boundary = MidB (Strrequestbin,posbeg,posend-posbeg)
Boundarypos = InstrB (1,strrequestbin,boundary)
' Get all data inside the boundaries
Do Until (Boundarypos = InstrB (Strrequestbin,boundary & Getbytestring ("--)")
' members variable of the objects are put in a Dictionary object
Dim Uploadcontrol
Set Uploadcontrol = CreateObject ("Scripting.Dictionary")
Dim Pos, Name
' Get ' object name
Pos = InstrB (boundarypos,strrequestbin,getbytestring ("Content-disposition"))
Pos = InstrB (pos,strrequestbin,getbytestring ("Name="))
Posbeg = Pos + Len ("name=") + 1
Posend = InstrB (posbeg,strrequestbin,getbytestring (Chr (34)))
Name = getString (MidB (Strrequestbin,posbeg,posend-posbeg))
Dim Posfile, Posbound, ContentType, Value
' Test if object is of file type
Posfile = InstrB (boundarypos,strrequestbin,getbytestring ("Filename="))
Posbound = InstrB (posend,strrequestbin,boundary)
If posfile <> 0 and Posfile < Posbound Then
' Get filepathname of the ' file
Posbeg = Posfile + Len ("filename=") + 1
Posend = InstrB (posbeg,strrequestbin,getbytestring (Chr (34)))
Filepathname = getString (MidB (Strrequestbin,posbeg,posend-posbeg))
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.