Server.ScriptTimeout = 300 'now i can upload and save files upto ~8Mb
Dim intLevel, intUpload, intSave, strError, strContenType, strFilename, lngFileSize
Dim objUpload
Dim lngTime, lngUploadTime, lngSaveTime
intLevel = Request.QueryString("level")
'--------------------------------------
wrHead
If intLevel = 1 Then
Set objUpload = New FileUpload
With objUpload
.Path = "D:Inetpubwwwroottest"
lngTime = Timer()
intUpload = .Upload
lngUploadTime = Round((Timer() - lngTime) * 1000,3)
lngTime = Timer()
intSave = .Save(true)
lngSaveTime = Round((Timer() - lngTime) * 1000,3)
strError = .Error
strFilename = .Filename
lngFilesize = .Size
strContentType= .ContentType
End With
Set objUpload = Nothing
End If
wrForm
wr "
"
wr "Upload = " & intUpload & "
"
wr "Save = " & intSave & "
"
wr "Error = " & strError & "
"
wr "Filename = " & strFilename & "
"
wr "Filesize = " & lngFilesize & "
"
wr "Content-Type = " & strContentType & "
"
wr "Upload time = " & lngUploadTime & " ms
"
wr "Save time = " & lngSaveTime & " ms
"
wr "
"
wrFoot
'--------------------------------------
Sub wrForm
wr "
"
End Sub
Sub wrHead
wr ""
wr "
"
wr ""
wr ""
wr ""
End Sub
Sub wrFoot
wr ""
wr ""
Response.End
End Sub
Sub wr(byval sText)
If sText "" Then Response.Write sText & vbNewLine
End Sub
%>
برچسب:
نویسنده: سام صمیمی
تاريخ: چهارشنبه
21 تير
1396 ساعت: 16:09