RadUpload with WCF RIA Services?

6 posts, 0 answers
  1. Jason
    Jason avatar
    2 posts
    Member since:
    Jan 2009

    Posted 29 Jun 2010 Link to this post

    For those of us using WCF RIA Services as the storage interface for our Silverlight applications, what is the best way to leverage the RadUpload?  I would like to use it to have the application user be able to upload and display a picture in the application.

    It seems that there is no direct mechanism to use in conjunction with WCF RIA Services.  Is there some sort of good design pattern or example that you can demonstrate?  Do we have to create a generic service seperate of our WCF RIA services just to upload\download the images?
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 30 Jun 2010 Link to this post

    Hello Jason,

    Can you elaborate a little bit more how you want to use the Upload with the WCF service? Do you want to save an image into the database and then to display it from the database using a WCF service, or you mean something else?

    Kind regards,
    Valentin.Stoychev
    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 banner
  4. Karanjit Siyan
    Karanjit Siyan avatar
    7 posts
    Member since:
    Apr 2010

    Posted 03 Aug 2010 Link to this post

    I have a similar requirement. Once file is uploaded to the ASP.NET server folder, I want to be able to stored the data in the uploaded file to a database. Assume that I have a stored proc interface via the RIA services that I can call. Please post some sample code, and write comments for the interface to the database since that part has to be generic.
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 06 Aug 2010 Link to this post

    Hi Karanjit Siyan,

    The RadUploadHandler is the default server endpoint for the upload and you can extend it by inheriting it.

    Using the RadUpload with RiaServices is possible. For example if you store images, you can keep just the image path in your business object (and DB). Retrieving the image can happen as an absolute url from your server or via a handler.

    What you need is to updated your DB after the upload has completed.

    This KB article can get you started on processing files on upload:

    http://www.telerik.com/support/kb/silverlight/upload/process-files-on-server.aspx

    All the best,
    Miroslav
    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. Jason Nguyen
    Jason Nguyen avatar
    14 posts
    Member since:
    May 2010

    Posted 23 Aug 2010 Link to this post

    Do you still support only Http Handlers (ashx generic handler in MSVS)?  I haven't found anything in the release notes stating otherwise.

    In my scenario we are using WCF Ria Services with Silverlight 4 and we have a WCF RIA Services Class Library.  This class library stores all of the services, we did this so we could seperate them from the Website project.  Is it possible for me to do the server side of the radUpload in this WCF Ria Services Class Library?
  7. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 26 Aug 2010 Link to this post

    Hello Jason Nguyen,

    Yes, we are using a HttpHandler.

    The code behind for the upload handler can be kept in any separate class library. The handler's markup file though needs to be in the web project:

    <%@ WebHandler Language="C#" Class="SLApp1.Web.MyUploadHandler" %>

    All the best,
    Miroslav
    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
Back to Top
DevCraft banner