Try
data = req.GetMultipartData(downloadfolder, MaxSize)
Dim filePart As Part = data.Get("upl")
If filePart.IsInitialized Then
fileName = filePart.SubmittedFilename
tmpFileName = filePart.TempFile
If IsAllowed(fileName) = False Then
File.Delete("", tmpFileName)
If SubExists(callback, "Page_FileUploaded") Then
CallSubDelayed3(callback, "Page_FileUploaded", fileName, False)
End If
'resp.SendError(500, "Not allowed")
Return
End If
' If Not(ABM.HandleUpload(downloadfolder, tmpFileName, ActiveCaseNumber & fileName)) Then
If SubExists(callback, "Page_FileUploaded") Then
CallSubDelayed3(callback, "Page_FileUploaded", fileName, True)
End If
' Else
' If SubExists(callback, "Page_FileUploaded") Then
' CallSubDelayed3(callback, "Page_FileUploaded", fileName, False)
' End If
' End If
Else ' try image