I can't recreate this issue, but it's been happening with my applications. Files are being named by the path of the uploaded file on the client's machine. For example, radUpload is trying to save an uploaded file to ~/casefiles/\\S001\scans\filename.pdf from the code below:
in .aspx:
<telerik:RadUpload runat="server" ID="Radupload1" TargetFolder="~/casefiles" InitialFileInputsCount="3"
OverwriteExistingFiles="false" OnFileExists="RadUpload1_FileExists" Skin="Skin" EnableEmbeddedSkins="false" />
In .aspx.vb
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
If Radupload1.UploadedFiles.Count > 0 Then
lblConfirm.Text = "File upload successfully,"
Else
lblError.Text = "Please choose at least one file to upload."
End If
End Sub
Protected Sub RadUpload1_FileExists(ByVal sender As Object, ByVal e As Telerik.Web.UI.Upload.UploadedFileEventArgs)
Dim counter As Integer = 1
Dim file As UploadedFile = e.UploadedFile
Dim targetFolder As String = Server.MapPath(RadUpload1.TargetFolder)
Dim targetFileName As String = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
While System.IO.File.Exists(targetFileName)
System.Math.Max(System.Threading.Interlocked.Increment(counter), counter - 1)
targetFileName = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
End While
file.SaveAs(targetFileName)
End Sub
in .aspx:
<telerik:RadUpload runat="server" ID="Radupload1" TargetFolder="~/casefiles" InitialFileInputsCount="3"
OverwriteExistingFiles="false" OnFileExists="RadUpload1_FileExists" Skin="Skin" EnableEmbeddedSkins="false" />
In .aspx.vb
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
If Radupload1.UploadedFiles.Count > 0 Then
lblConfirm.Text = "File upload successfully,"
Else
lblError.Text = "Please choose at least one file to upload."
End If
End Sub
Protected Sub RadUpload1_FileExists(ByVal sender As Object, ByVal e As Telerik.Web.UI.Upload.UploadedFileEventArgs)
Dim counter As Integer = 1
Dim file As UploadedFile = e.UploadedFile
Dim targetFolder As String = Server.MapPath(RadUpload1.TargetFolder)
Dim targetFileName As String = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
While System.IO.File.Exists(targetFileName)
System.Math.Max(System.Threading.Interlocked.Increment(counter), counter - 1)
targetFileName = Path.Combine(targetFolder, file.GetNameWithoutExtension() + counter.ToString() + file.GetExtension())
End While
file.SaveAs(targetFileName)
End Sub