<%
' Upload Sem componentes ---------------------------------------
Sub BuildUploadRequest(RequestBin)
on error resume next
PosBeg = 1
PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(13)))
boundary = MidB(RequestBin, PosBeg, PosEnd - PosBeg)
BoundaryPos = InStrB(1, RequestBin, boundary)
Do Until (BoundaryPos = InStrB(RequestBin, boundary & getByteString("--")))
Dim UploadControl
Set UploadControl = CreateObject("Scripting.Dictionary")
Pos = InStrB(BoundaryPos, RequestBin, getByteString("Content-Disposition"))
Pos = InStrB(Pos, RequestBin, getByteString("name="))
PosBeg = Pos + 6
PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(34)))
Name = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))
PosFile = InStrB(BoundaryPos, RequestBin, getByteString("filename="))
PosBound = InStrB(PosEnd, RequestBin, boundary)
If PosFile <> 0 And (PosFile < PosBound) Then
PosBeg = PosFile + 10
PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(34)))
FileName = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))
UploadControl.Add "FileName", FileName
Pos = InStrB(PosEnd, RequestBin, getByteString("Content-Type:"))
PosBeg = Pos + 14
PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(13)))
ContentType = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))
UploadControl.Add "ContentType", ContentType
PosBeg = PosEnd + 4
PosEnd = InStrB(PosBeg, RequestBin, boundary) - 2
Value = MidB(RequestBin, PosBeg, PosEnd - PosBeg)
Else
Pos = InStrB(Pos, RequestBin, getByteString(Chr(13)))
PosBeg = Pos + 4
PosEnd = InStrB(PosBeg, RequestBin, boundary) - 2
Value = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))
End If
UploadControl.Add "Value", Value
UploadRequest.Add Name, UploadControl
BoundaryPos = InStrB(BoundaryPos + LenB(boundary), RequestBin, boundary)
Loop
End Sub
Function getByteString(StringStr)
For i = 1 To Len(StringStr)
Char = Mid(StringStr, i, 1)
getByteString = getByteString & ChrB(AscB(Char))
Next
End Function
Function getString(StringBin)
getString = ""
For intCount = 1 To LenB(StringBin)
getString = getString & Chr(AscB(MidB(StringBin, intCount, 1)))
Next
End Function
' Fim upload sem Componentes -----------------------------------------
%>
Publicidade
|
|
Page 1 of 1
Upload Sem componentes
#1
Posted 28 October 2010 - 11:08 AM
Share this topic:
Page 1 of 1
Similar Topics
| Topic | Forum | Started By | Stats | Last Post Info | |
|---|---|---|---|---|---|
|
FileField dreamweaver
FileField sem Developertoolbox |
Dreamweaver |
thdesigner
|
|
|
|
Comentário: Fim da RCTV foi "sem querer querendo"
|
Notícias |
Notícias
|
|
|
|
Litoral de São Paulo tem acesso gratuito e sem fio à internet
|
Notícias |
Notícias
|
|
|
|
Texto DW...
Inserir texto sem desconfigurar a tabela |
Dreamweaver |
2kPublicidade
|
|
|
|
Quiz: Veja se você está por dentro dos números da semana
|
Notícias |
Notícias
|
|
|
|
Upload e renomeação
erro... |
ColdFusion |
reoshiro
|
|
|
|
Dobradinha Pokémon entre os lançamentos da semana
|
Notícias |
Notícias
|
|
|
|
com foto ou sem foto "2"
nao consigo inserir if nas fotos... |
ASP e ASP.Net |
evandrodep
|
|
Publicidade
|
|

Help













