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

Newbie upload questions

3 Answers 66 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Gary Blakely
Top achievements
Rank 1
Gary Blakely asked on 22 Aug 2010, 08:15 PM
After reading your docs on Upload, I make a reference to Telerik.Windows.RadUploadHandler in my WCF web service project and create an .ashx file with the following contents...

using

 

 

System;

 

using

 

 

System.Collections.Generic;

 

using

 

 

System.Linq;

 

using

 

 

System.Web;

 

using

 

 

Telerik.Windows.Controls;

 

namespace

 

 

PhotoWCFX.Web

 

{

 

 

public class UploadHandler : RadUploadHandler

 

  {

 

  }

}
The first problem is that type or namespace "RadUploadHandler" could not be found.  So what did I do wrong?

After reading further in the docs, it appears that the control simply puts a file into a folder on the server.  But that's no good because I need to process the file in my WCF service.  What good would it be to upload a file if I can't process it?

Can you help me out here?
Thanks,
Gary

3 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 25 Aug 2010, 02:50 PM
Hi Gary Blakely,

The RadUploadHandler is just a web handler and is not dependent on WCF. If you want to extend it, you can override certain methods in your UploadHandler class.

You can also try using WCF alone where the file upload will be a binary field on an object that will be sent to the server. This will involve more code on the client though.

With the RadUpload you get features like uploading multiple files, uploading in chunks, ready UI and others. To integrate it with your application, override methods on the upload handler - there are KB articles for certain scenarios:

http://www.telerik.com/support/kb/silverlight/upload/uploadhandler-uniquefilename.aspx

This one can be something that you can use:

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

Depending on what you want to achieve, you can add the file to your DB (or its path for example).

The missing reference may appear as an error because the RadUploadHandler assembly has not been added to the web project.

Regards,
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
d
Top achievements
Rank 1
answered on 25 Aug 2011, 12:11 PM
I really baffled by this control.

Im using Silverlight.

I upload a file, it is saved to the web server.

I need a byte array in my business object.

Why does the control not stream the file directly to the silverlight object? Im really confused. So to get the file, I have to upload the file, then get a URL to it on my web server, then stream it, again, back across the wire so I can use it in my business object?

Please tell me Im going mad... or help..


0
Petar Mladenov
Telerik team
answered on 30 Aug 2011, 04:11 PM
Hi D,

 In Silverlight, there is a limitation that restricts you from operating directly with the file system. Could you please elaborate more on your scenario so that we would be better able to assist you? I guess you mean Silverlight application when saying "Silverlight object"?

Regards,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Upload
Asked by
Gary Blakely
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
d
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or