This is a migrated thread and some comments may be shown as answers.

Filename property not changing for subsequent uploads

3 Answers 36 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Carlin
Top achievements
Rank 2
Carlin asked on 06 Oct 2010, 01:41 PM
On a single customer system, I have a scenario where if I upload multiple files either on thier own or in a batch, the filename seems to "stick", which as a result causes me to update the same data record over and over.   The getname function is working correctly because the display name field on the data record is being updated.   Not able to re-create on approx 10 other production/development systems on the same application build. 

Any ideas/suggestions?  below is the process code - 3rd line seems to be the problem, and given that it works on other systems seems to tie back to the GUI control or browser that is in some way unique to this installation.

 

 

 

For Each uploaditem As Telerik.Web.UI.UploadedFile In rupUploadFile1.UploadedFiles
      Dim objUploadStruct As New Structures.CommonStructures.UploadStruct
      objUploadStruct.originalfilepath = uploaditem.FileName
      objUploadStruct.CustomerID = userinfo.ActiveCustomerID(False)
      objUploadStruct.CategoryID = GetCategoryID()
      objUploadStruct.OrganizationID = GetOrganizationID()
      objUploadStruct.MessageTrackingid = GetMessageTrackingID
      objUploadStruct.imageusageid = enuImageUsageID
      objUploadStruct.RequestPoint = enuUploadTriggerPoint
      objUploadStruct.UserID = userinfo.UserID
      objUploadStruct.LinkedContent = LinkedContent
      objUploadStruct.FileName = uploaditem.GetName
      objUploadStruct.LanguageID = userinfo.DefaultLanguage
      objUploadStruct.Display_Name = Left(uploaditem.GetName, uploaditem.GetName.LastIndexOf("."))
      objUploadStruct.Description = Left(uploaditem.GetName, uploaditem.GetName.LastIndexOf(".")) + " from upload"
      'objUploadStruct.EntryTypeID = GetEntryTypeID(uploaditem.GetExtension)
      Try
          uploadedid = SaveUploadedFile(objUploadStruct, rupUploadFile1.TargetPhysicalFolder + "\" + uploaditem.GetName)
          If uploadedid = 0 Then
              bolIsError = True
              strErrorMessage.AppendLine(uploaditem.GetName & ": " & Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("UnspecifiedError", intLanguageCode) & "<br />")
          End If
      Catch ex As Exception
          strErrorMessage.AppendLine(uploaditem.GetName & ": " & Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString(ex.Message.Replace(" ", "").Replace(".", ""), intLanguageCode) & "<br />")
          bolIsError = True
      End Try
  Next


Thanks

Carlin

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 11 Oct 2010, 02:25 PM
Hi Carlin,

As far as I can see nothing special happens on the third line, it is just the creation of the object?

Dim objUploadStruct As New

Apart from this I'm having hard time understanding your problem. Do you mean that inside the For Each loop FileName returns the same string for each file? Have you tried to debug your application on order to see If there is anything wrong with the UploadedFilesCollection, for example duplicated files? In general, we are not aware of such problem with RadUpload nor we have received any similar reports. What browser does the customer system use?

All the best,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Carlin
Top achievements
Rank 2
answered on 11 Oct 2010, 02:41 PM
That is actully the 2nd line - 3rd line is

      objUploadStruct.originalfilepath = uploaditem.FileName

On any development system where we can debug, this control/process is working properly; on other "client" systems within the customer network it is also working properly when we access the application on the server.  It is only on the server where it is not working properly and the uploadeditem.filename seems to be "stuck".  

At this time the customer is not allowing us to install any type of debugging applications on the server to figure this out.    Server 2008R2; latest version of IE is in use.

Carlin
0
Genady Sergeev
Telerik team
answered on 15 Oct 2010, 08:57 AM
Hi Carlin,

I can't see any possible way how would that happen. The UploadedFiles collection is populated from the Request.Files collection which is in turn populated by the ASP.NET runtime. This means that the upload component on its own cannot duplicate the files unless they are duplicated in the Request.Files collection. Can you please check whether this is the case?


All the best,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Upload (Obsolete)
Asked by
Carlin
Top achievements
Rank 2
Answers by
Genady Sergeev
Telerik team
Carlin
Top achievements
Rank 2
Share this question
or