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

[Solved] Upload, controller, action and areas

1 Answer 146 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ed
Top achievements
Rank 1
Ed asked on 03 Mar 2011, 05:13 PM
Hi,

I have been using upload and love it. However, I'm running into an issue I have been unable to solve.

I have an Area called offline. The HomeController is inside this area. I have a Photo view off of this controller. Inside this view is the following code:

       Click the select button and select an image from your computer</h3>
    @(Html.Telerik().Upload()
        .Name("attachments")
        .Async(async => async
            .Save("photosave", "photo", new { messageId = ViewBag.MessageId })
                .Remove("removephoto", "photo", new { messageId = ViewBag.MessageId }))
            .Multiple(false)
            .ClientEvents(events => events
                .OnSuccess("onSuccess")
                .OnUpload("onUpload")
                .OnRemove("onRemove")))

The issue is that the photosave action in the photo controller is in the sites main controllers folder, not the area. So upload can't find it. It defaults to looking for the controller and action in the context of the currently executing area. How can I inform the upload control that the photo controller is not in the "offline" area, but instead in the sites main /controller folder?

Many Thanks
                

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 04 Mar 2011, 08:20 AM
Hello Ed,

You should be able to configure the upload the same way you would configure an Html.ActionLink. 

Regards,
Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Upload
Asked by
Ed
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or