RadAsyncUpload and file value fields

Thread is closed for posting
10 posts, 0 answers
  1. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 21 Jun 2010 Link to this post

    Hi,
    Im using the RadAsyncUpload control with 4-5 upload fields.
    I want to distinguish the files based on the upload input field (because I want different validation for each one).
    For this purpose I have added hidden textboxes as in "Adding Information to Uploaded Files" example.
    How I can access these fields without to upload the file(postback)?  Im using ajaxmanager request to get the file data for preview purposes,
    but it seems that the additional field info is not "uploaded" with the temporary file.

  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 24 Jun 2010 Link to this post

    Hello Lighthouse Developer,

    RadAsyncUpload currently does not support additinal fields. We will get this fixed for the upcoming Q2 release. Meanwhile I suggest that you use manually placed RadTextBoxes and fixed count of  RadAsyncUpload fields. Please excuse us for the caused inconveniences.

    Regards,
    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. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 22 Jul 2010 Link to this post

    Hi Genady Sergeev ,

    I am trying to use the hidden textboxes as I have mentioned in my older post,
    this time in the Proccess method of the custom HttpHandler which I have implemented based on the relative demo.
    But every time I'm trying to get the field value with file.GetFieldValue("Title") ,where file is an UploadedFile instance,
    it returns null.
    The additional fields support hasn't been added in the Q2 release?

    Thank you very much
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 28 Jul 2010 Link to this post

    Hello,

    This feature is indeed missing in the Q2 release. We didn't implement it right away as we think that the existing approach can be improved to provide the same or better functionality.

    We're not ready with this and I can't think of an easy way to achieve this with RadAsyncUpload, as it won't post anything else to the handler besides the file and the control configuration.

    Can you describe your scenario in more detail? How is the validation different for each file input? Perhaps we can figure out a way to do it with the existing functionality.

    Greetings,
    Tsvetomir Tsonev
    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
  6. Karl Mikesell
    Karl Mikesell avatar
    55 posts
    Member since:
    May 2010

    Posted 11 Aug 2011 Link to this post

    Has the ability to post additional information with the the RadAsyncUpload /w HttpHandlerUrl="~/myHandler.ashx" been completed in any release?  I see the following:

    Content-Disposition: form-data; name="rauPostData"

    /wEFrgN7IlRhcmdldEZvbGRlciI6Ii93RmxNS0tpMGgwZmZwRnUxZXo1emYyUXY0QzVSTjQ9IiwiVGVtcFRhcmdldEZvbGRlciI6Ii93RUZSV002WEdsdVpYUndkV0pjZDNkM2NtOXZkRngzYzNOY1ZtbHlkSFZoYkVScGNtVmpkRzl5YVdWelhEZ3dNRE5jUVhCd1gwUmhkR0ZjVW1Ga1ZYQnNiMkZrVkdWdGNCVHhnNFB6UGRqUjJUQ2lBMWhpQ0tJN3I3VHoiLCJNYXhGaWxlU2l6ZSI6MTAyNDAwLCJUaW1lVG9MaXZlIjp7IlRpY2tzIjoxNDQwMDAwMDAwMDAsIkRheXMiOjAsIkhvdXJzIjo0LCJNaWxsaXNlY29uZHMiOjAsIk1pbnV0ZXMiOjAsIlNlY29uZHMiOjAsIlRvdGFsRGF5cyI6MC4xNjY2NjY2NjY2NjY2NjY2NiwiVG90YWxIb3VycyI6NCwiVG90YWxNaWxsaXNlY29uZHMiOjE0NDAwMDAwLCJUb3RhbE1pbnV0ZXMiOjI0MCwiVG90YWxTZWNvbmRzIjoxNDQwMH19UVhbxAGU7k2kb4kzI3T/rznw+z4=&/wEFgAFUZWxlcmlrLldlYi5VSS5Bc3luY1VwbG9hZENvbmZpZ3VyYXRpb24sIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMTEuMS40MTMuMzUsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MTIxZmFlNzgxNjViYTNkNJD/duWN6R3LStIc/aEs83Nx4Ihj
    -----------------------------7db2d8254051a--


    Using a custom handler how does this get decoded?
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 16 Aug 2011 Link to this post

    Hello Karl,

    rauPostData is a serialized data for the configuration of the RadAsyncUpload control. Please review GetConfiguration method of the AsyncUploadHandler.cs source file. It deserialize the rauPostData .
    Configuration of the RadAsyncUpload is passed as a overload parameter into Process method of the AsyncUploadHandler class.

    Kind regards, Peter Filipov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. Karl Mikesell
    Karl Mikesell avatar
    55 posts
    Member since:
    May 2010

    Posted 30 Aug 2011 Link to this post

    GetConfiguration must be a private method.

    I would like to decode:

    string

     

     

    rauPostData = context.Request.Form["rauPostData"];

     


  9. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 02 Sep 2011 Link to this post

    Hi Karl,

    To deserialize rauPostData variable we use a custom class. It uses the LosFormatter. To know in details how the GetConfiguration method works, please review the source code of our controls.

    Regards,
    Peter Filipov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  10. Karl Mikesell
    Karl Mikesell avatar
    55 posts
    Member since:
    May 2010

    Posted 02 Sep 2011 Link to this post

    This results in the following exception:
    System.FormatException was caught
      Message=Invalid character in a Base-64 string.
      Source=mscorlib
      StackTrace:
           at System.Convert.FromBase64String(String s)
           at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
           at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject, Boolean enableMacValidation)
           at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject)

     

     

     

    string rauPostData = context.Request.Form["rauPostData"];

     

    object o =

     

    LosSerializer.Deserialize(rauPostData);

     


    Content-Disposition: form-data; name="rauPostData"


    Still No Joy.
  11. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 07 Sep 2011 Link to this post

    Hello Karl,

    In case you want to use custom configuration please review the following demo. The only way to get implementation of GetConfiguration method is from the source code of RadAsyncUpload.

    Kind regards,
    Peter Filipov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017