This is a migrated thread and some comments may be shown as answers.
Large File Upload using MVC Razor
7 Answers 110 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cyril
Top achievements
Rank 1
Cyril asked on 03 Aug 2011, 12:39 PM
I am looking at a solution to upload large files. I would like to use MVC with the Razor syntax but if I am not mistaken:

a. The MVC Upload control is limited to 4Mb. I understand that you can up that to 20Mb or go higher but you are starting to play with timeout value guessing and it will never work with files of 2Gb
b. The ASP.NET AJAX control AsyncUpload works with files chunk and therefore can handle very large files. (using HTTPModule and HTTPHandler)
c. The ASP.NET AJAX control AsyncUpload cannot be integrated with MVC Razor because Aspx and Razor don't play well together.
d. The ASP.NET AJAX control AsyncUpload can be integrated with MVC ASPX but you do not get access to the server side event (FileUploaded, FileFailed, UploadStarted, ...)

So first, is that correct ?
 
Best case, I am wrong ! Then can someone explain how to get the MVC Razor to upload files as chunks.
Worst case, I am right... Then are there any plans in the roadmap to provide MVC Razor to upload files as chunks ? 

Thanks

7 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 04 Aug 2011, 08:10 AM
Hi Cyril,

The MVC Upload extension does not support chunking. This would require the use of Silverlight/Flash in some browsers and we want to keep it plug-in free.

Our recommendation is to use the RadAsyncUpload in a WebForms view. Such views can be used in a Razor project as well. 

I hope this helps.

All the best,
Tsvetomir Tsonev
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
TDG
Top achievements
Rank 1
answered on 28 Sep 2011, 08:09 PM
Since you don't have chuck feature on MVC extension, can you provide us a sample code for ASP.NET Upload chuck feature on MVC project?
I don't mine using Aspx and codebehnd for chunk uploading for large file on MVC (aspx or html5).

thanks in advance,

0
T. Tsonev
Telerik team
answered on 29 Sep 2011, 01:02 PM
Hello,

I've prepared a sample project that shows how to use RadAsyncUpload in an MVC3 project.

Normally, the RadAsyncUpload moves the files at their final location on postback. I've created a custom handler that stores the files immediately. Custom handlers are also demonstrated here.

Best wishes,
Tsvetomir Tsonev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
King Wilder
Top achievements
Rank 2
answered on 26 Mar 2012, 08:36 PM
To follow up on the original question regarding uploading large files with Razor views, are you saying that it's not possible to include the RadAsyncUpload control to a Razor view?  I haven't tried it yet but I looked at the downloadable example from the last post and it's all WebForms views.

I already have a completed MVC Razor application and I'm using the MVC Upload extension and it works for files that are less than 100MB, but fails for any files that are over that size.  Are there any solutions for my scenario?

Thanks,

King Wilder
0
T. Tsonev
Telerik team
answered on 27 Mar 2012, 08:05 AM
Hi,

You can mix Razor and WebForms views in a single application, although it's not officially supported. We don't have a ready example, but we will provide assistance if you have trouble doing so.

All the best,
Tsvetomir Tsonev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
King Wilder
Top achievements
Rank 2
answered on 27 Mar 2012, 04:53 PM
Tsvetomir,

Yes, I've actually mixed them in other applications, but I've never placed a RadControl in a Razor view and really wanted to know if that is possible? 

Is it as simple as making a reference to the Telerik.Web.UI assembly and adding the code for the control to the Razor view?

The reason I'm asking is because my app needs to upload videos of 150MB to 1GB to the server and the MVC Extension doesn't handle files that large.  At the moment I've found a free solution that has a progress indicator.

Also, the web app is already built entirely with Razor views, so I can't swap them out at this point.

Thanks,

King Wilder
0
T. Tsonev
Telerik team
answered on 30 Mar 2012, 01:52 PM
Hello,

I've prepared a sample project with RadAsyncUpload in a Razor MVC project.

I hope this helps.

Regards,
Tsvetomir Tsonev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Upload
Asked by
Cyril
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
TDG
Top achievements
Rank 1
King Wilder
Top achievements
Rank 2
Share this question
or