Handling file upload in SL not Web Project

4 posts, 0 answers
  1. James
    James avatar
    2 posts
    Member since:
    Aug 2012

    Posted 19 Nov 2011 Link to this post

    Hi,

    I have a Silverlight project that uses a standard file dialog to upload a file. The file is brought in to memory, processed and serailised to a database, no Web Project involvement. I'd like to swap out the standard file dialog for a Telerik RadUpload, but keep the existing SL methods. Is it possible to not use the ServiceUrl and handle the upload in SL, taking advantage of the great functionality such as the upload indicator percent?

    Thanks.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Nov 2011 Link to this post

    Hi Michael,

     The RadUpload control must use an upload handler on the server in order to transfer its data. This handler is represented by a Generic (Ashx) Handler class that derives from the RadUploadHandler class. We wanted to mention this because we are not sure we understood your sceanario.
    What are the exact controls/functionalities that you need from the RadUpload? Is it only the ProgresBar ? Could you please elaborate more on your scenario so that we would be better able to advice you.

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. James
    James avatar
    2 posts
    Member since:
    Aug 2012

    Posted 24 Nov 2011 Link to this post

    Hi Petar,

    To explain further. I have an MVC site with a Silverlight application in it. The silverlight application has a file uploader which runs off of standard file dialog controls. Currently once a file is selected and submitted the silverlight application reads the filestream in to memory, processes the file, and serialises it to the database via DomainServices.

    I'd like to swap out the standard Silverlight file control for your much better Telerik RadUpload, but want to keep the existing code. Is this possible?

    Michael
  5. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 29 Nov 2011 Link to this post

    Hello Michael,

    It is possible to replace your uploading mechanism with the upload control, but you would have to process the file on the server. You can look at our knowledge base article for processing files on the server after upload here or how to save a file into database here. You could use these code samples to adjust the upload control for your scenario and environment. Please let us know if you have further questions on this matter.

    Greetings,
    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top