Filename property not changing for subsequent uploads

Thread is closed for posting
4 posts, 0 answers
  1. Carlin
    Carlin avatar
    5 posts
    Member since:
    Apr 2008

    Posted 06 Oct 2010 Link to this post

    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

     

     

     

     

     

     

  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 11 Oct 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Carlin
    Carlin avatar
    5 posts
    Member since:
    Apr 2008

    Posted 11 Oct 2010 Link to this post

    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
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 15 Oct 2010 Link to this post

    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
Back to Top