Buon pomeriggio a tutti.
Ho scoperto un errore relativo all'upload di un file che si verifica solo quando il file è un pdf.
Se di altro tipo non succede nulla ma se è un pdf mi restituisce l'errore:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'MidB'
/backoffice/shared/upload.asp, line 831
Il codice incriminato è:
If FileName<>"" then
Stream.Position = arPosName(i)-1
RequestBin = Stream.Read (60)
Pos = InStrB(1,RequestBin,c13b)
ContentType = BinaryToString(MidB(RequestBin,1,Pos-1))
arContent = Split(ContentType,": ")
ContentType = arContent (1)
StreamType=1 : If InStr(ContentType,"text/")>0 then StreamType=2
PosBeg = arPosName(i) + Pos + 2
Stream.Position = PosBeg
RequestBin = Stream.Read (arPosEnd(i)-PosBeg-3)
AddNewRs Name,FileName,ContentType,StreamType,RequestBin
if LoadFilesInForm then AddToForm Name,FileName
else
Form(Name) = ""
end if
e la riga 831 è lei: ContentType = BinaryToString(MidB(RequestBin,1,Pos-1))
Help me!![]()
Grazie mille!

Rispondi quotando
