Buondi.
Ho creato un bel programma che funziona in intranet per cui c'è bisogno di "uploadare" alcuni files.
Per i files di piccole dimensioni (jpg, doc o txt) non c'è problema, ma quando si tratta di cose un pochino piu grandi (anche 800 - 900 k, per intenderci) mi dà errore dopo 4 o 5 secondi.
Il programma gira in intranet su windows server 2003.
Di seguito posto il codice che uso. Sapreste dirmi dove devo intervenire per poter "uploadare" files più grandi? (magari non devo intervenire sul codice ma sui permessi o altro...non lo so proprio)
<%
dim loFileExist
dim flagErr
Response.Expires=0
Response.Buffer = TRUE
Response.Clear
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = UploadRequest.Item("blob").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
value = UploadRequest.Item("blob").Item("Value")
'Create FileSytemObject Component
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
'Create and Write to a File
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_I NFO")))-14
loFileExist = ScriptObject.FileExists(Left(Server.mappath(Reques t.ServerVariables("PATH_INFO")),pathEnd) & filename)
if loFileExist = false then
Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Re quest.ServerVariables("PATH_INFO")),pathEnd) & filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
flagErr = 1
else
flagErr = 0
end if %>

Rispondi quotando