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

RadUpload with WCF RIA Services?

5 Answers 150 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 29 Jun 2010, 07:28 PM
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?

5 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 30 Jun 2010, 07:28 AM
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
0
Karanjit Siyan
Top achievements
Rank 1
answered on 03 Aug 2010, 01:19 PM
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.
0
Miroslav
Telerik team
answered on 06 Aug 2010, 11:21 AM
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
0
Jason Nguyen
Top achievements
Rank 1
answered on 23 Aug 2010, 05:33 PM
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?
0
Miroslav
Telerik team
answered on 26 Aug 2010, 12:30 PM
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
Tags
Upload
Asked by
Jason
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Karanjit Siyan
Top achievements
Rank 1
Miroslav
Telerik team
Jason Nguyen
Top achievements
Rank 1
Share this question
or