Add dynamically files in RadAsyncUpload

6 posts, 1 answers
  1. kd
    kd avatar
    23 posts
    Member since:
    Dec 2011

    Posted 17 Jan 2012 Link to this post

    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

  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 20 Jan 2012 Link to this post

    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
  3. kd
    kd avatar
    23 posts
    Member since:
    Dec 2011

    Posted 21 Jan 2012 Link to this post

    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
  4. Answer
    Anton
    Anton avatar
    3 posts
    Member since:
    Nov 2008

    Posted 18 May 2012 Link to this post

    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
  5. Attila
    Attila avatar
    7 posts
    Member since:
    May 2008

    Posted 18 Jul 2012 Link to this post

    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
  6. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 22 Jul 2012 Link to this post

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