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

Add dynamically files in RadAsyncUpload

5 Answers 468 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
kd
Top achievements
Rank 1
kd asked on 17 Jan 2012, 10:10 AM
Hi all,
i have stored files in BLOBs at the insert time it works fine but when i am going to edit a records how can i add those files data in RadAsync FileUpload and stored files shown in file uploader

5 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 20 Jan 2012, 03:56 PM
Hello,

In order to achieve the desired functionality you could combine the approaches from the following two demos here and here. You should develop a custom handler and then persist the uploaded file using the approach from the second demo.

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
kd
Top achievements
Rank 1
answered on 21 Jan 2012, 06:57 AM
thanks for rpl,
actually my problem is that i want to load all files in RadAsyncUpload from db,
for expamle when we are browsing files through radasyncupload, The uploaded files shown above the radasyncupload where user can b able to remove files by clicking on close icon. my problem is this i am getting all files list from blobs but how can i shown files above the radasyncupload
0
Accepted
Anton
Top achievements
Rank 1
answered on 18 May 2012, 08:50 AM
Hi Kd


I dont know if you found a solution for this. I was also struggling with this.
My case was I have an Integrator the allows the user to forward a message with attached items.

I made use of a repeater and replicated the format of how the items look like when added to the Upload. Still needs some tweeking but its working

<asp:Repeater ID="rpAttachements" runat="server">
                       <ItemTemplate>
                           <div>
                               <img src="../../Images/attachmentBubble.jpg" /><asp:Label ID="lblFilename" runat="server"
                                   Text='<%# Eval("DOC_FILENAME")%>'></asp:Label>
                               <telerik:RadButton runat="server" OnClick="img_click" ID="hpLink" Value='<%# Eval("INTG_ATTACHMENTID")%>'
                                   UseSubmitBehavior="False" Width="44px" Height="12px">
                                   <Image ImageUrl="~/Images/RemoveImage.jpg" EnableImageButton="True" />
                               </telerik:RadButton>
                           </div>
                       </ItemTemplate>
                   </asp:Repeater>


Then it depends on how you want to use it .. But in the code behind for the click event of the Image , you can either Remove the item from the repeater or from the Database.
In my case I just want it toi be removed from the Repeater.
So when the message is sent i just get the remaining items from the repeater. Either select or just insert from the same table where the ids match up.

To get the Value of the Item just use ((RadButton)sender).Value in the click event.

I dont think this is a solution but in my case it was 'n work around that helped me until I have time to work on it again.

Thanks ,
Hope it Helps
0
Attila
Top achievements
Rank 1
answered on 18 Jul 2012, 09:50 PM
Dimitar,
 
    Here's the scenario that we have; our website has an add/edit page for products. When a product editor wants to add a new product, they can attach a video file to the product. The RadAsyncUpload control seems to meet this need perfectly

    That same product manager may want to come back to the same product the next day and "remove" the associated video. I don't see a built in way to use the RadAsyncUpload control to show the file that is currently associated with the product. When you upload a file using the control, it provides a nice UI that shows you the file name and a red "x" that you can use to remove the file. We'd like to have an option to setup the UI similar to that, but for which the user hasns't currently uploaded a file for. (We have all of the file information in a database.) If we had a way to specify the file name in the code behind it would at least provide us with a clean way to show things. The alternative, which isn't so desireable, it to create a custom UI that deal with this type of scenario.

    Please let me know if there's perhaps anything in the control that provides such functionality, that we're missing.

Thanks,
Attila
0
Dimitar Terziev
Telerik team
answered on 22 Jul 2012, 04:39 PM
Hello Attila,

The soul purpose of the RadAsyncUpload is to upload files from the client to the server rather than providing UI for managing already uploaded files. For the described scenario a FileExplorer with custom provider would be more suitable. Here is a demo showing such scenario.

All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
kd
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
kd
Top achievements
Rank 1
Anton
Top achievements
Rank 1
Attila
Top achievements
Rank 1
Share this question
or