Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upload contains full local path of the user
Message
From
15/11/2011 14:26:04
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Upload contains full local path of the user
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01528948
Message ID:
01528948
Views:
82
I have never seen this before. My upload class has served over 25,000 uploads so far and this is a first. I have this code:
            Dim lcControl As String = ""
            Dim lcFileName As String = ""
            Dim lnFileSize As Integer = 0
            Dim loFileUpload As System.Web.UI.WebControls.FileUpload = New System.Web.UI.WebControls.FileUpload
            Dim loHttpPostedFile As System.Web.HttpPostedFile = Nothing

                ' Get a reference to the control
                loFileUpload = oProcess.oPage.FindControl(lcControl + "$FileUpload")

                ' If the file was uploaded
                If Not loFileUpload Is Nothing Then

                    ' Get a reference to the posted file
                    loHttpPostedFile = loFileUpload.PostedFile

                    ' See if the file was submitted
                    If Not loHttpPostedFile Is Nothing Then

                        ' Get the file size
                        lnFileSize = loHttpPostedFile.ContentLength

                        ' If the file was submitted
                        If lnFileSize > 0 Then

                            ' Get the file name
                            lcFileName = loHttpPostedFile.FileName
lcFileName usually gives the file name. But, in a particular case, I end up with something like this:

"C:\Users\UserHere\Desktop\data file - drp - english - on.pdf"

What is causing this?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform