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

RadUpload, file handling + RIA Services

1 Answer 78 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Drammy
Top achievements
Rank 1
Drammy asked on 26 Oct 2010, 05:27 PM
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...

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 29 Oct 2010, 12:10 PM
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.

Regards,
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
Tags
Upload
Asked by
Drammy
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or