RadUpload, file handling + RIA Services

2 posts, 0 answers
  1. Drammy
    Drammy avatar
    38 posts
    Member since:
    Feb 2008

    Posted 26 Oct 2010 Link to this post

    Hi all,

    Just looking for some general advice really...

    I am successfully using the RadUpload control to handle file uploads from the Silverlight Client ot the Server.

    I am also using RIA services with the Entity Framework to transfer my database objects up and down from Server to Client.

    I have a gallery table where each record has one or more imagestub records.  The imagestub record has a path to the file that is uploaded by the Silverlight Client.

    So, I have a page in my silverlight application that displays a listbox of Galleries (generated using a central domaincontext (made available sitewide via app.xaml) + domaindatasource).  The user selects a gallery and then uploads image files against that gallery.

    When a file is uploaded I want to rename the file and create a folder structure (using a storage machanism based on the file id).  So I then store the file in the particular folder and then store the imagestub in the database referencing the galleryId for which it was created against.

    I am just struggling wiith the order in which things should get done.  I have the upload working fine and understand that I need to override methods on the class inheriting from RadUploadHandler.
    So I guess my main issue is - How do I send the GalleryId down the pipe during the upload process so that when I create the ImageStub in the database it references the correct gallery?

    Any alternative suggestions also welcome...
  2. Alex Fidanov
    Alex Fidanov avatar
    636 posts

    Posted 29 Oct 2010 Link to this post

    Hello Drammy,

    The RadUpload control provides the ability to send messages (parameters) from the client to the server and vice versa. Have you looked at the articles in our help regarding this feature? Regarding the renaming of the file, you can take a look at this article as well.

    Alex Fidanov
    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. DevCraft R3 2016 release webinar banner
Back to Top