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

RadAsyncUpload and file value fields

9 Answers 508 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Lighthouse Developer
Top achievements
Rank 1
Lighthouse Developer asked on 21 Jun 2010, 02:43 PM
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.

9 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 24 Jun 2010, 04:07 PM
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
0
Lighthouse Developer
Top achievements
Rank 1
answered on 22 Jul 2010, 06:00 PM
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
0
T. Tsonev
Telerik team
answered on 28 Jul 2010, 02:27 PM
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
0
Karl Mikesell
Top achievements
Rank 1
answered on 11 Aug 2011, 04:46 PM
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?
0
Peter Filipov
Telerik team
answered on 16 Aug 2011, 12:13 PM
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.

0
Karl Mikesell
Top achievements
Rank 1
answered on 30 Aug 2011, 03:41 PM
GetConfiguration must be a private method.

I would like to decode:

string

 

 

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

 


0
Peter Filipov
Telerik team
answered on 02 Sep 2011, 09:25 AM
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 >>

0
Karl Mikesell
Top achievements
Rank 1
answered on 02 Sep 2011, 03:48 PM
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.
0
Peter Filipov
Telerik team
answered on 07 Sep 2011, 09:41 AM
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 >>

Tags
Upload (Obsolete)
Asked by
Lighthouse Developer
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Lighthouse Developer
Top achievements
Rank 1
T. Tsonev
Telerik team
Karl Mikesell
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or