0

So after two days of googling incessantly and apparently asking the wrong questions, I think I have figured out a way to word it so I get the response I'm looking for.

I have a Project Management application, written in MVC3. Sometimes, the users have to attach large files and upload them to the applications. (100-200 mb) is typical. The problem of course is that this is currently handled synchronously, and varying network speeds mean that the application can be completely blocked for 10 minutes to an hour if someone's on a slow connection. FTP is NOT an option here (my hands are tied by our network guys on that one).

So I am looking for a way to do the following workflow:

  • user clicks Upload File
  • user selects File to upload
  • user clicks "Go" or whatever button
  • Application says "your file is being uploaded. You will be notified when it's complete"
  • user continues to use the application as normal.

Some things to be aware of: I already have an internal messaging system implemented. So when I say that the app will notify the user when it's complete - all it needs to do is insert a new message into the queue. It DOES NOT need to notify the user's current screen or anything like that - so I'm not worried about a return value of any kind. I also have a background Error log implemented, so I can insert a message into the log if something goes wrong and again - inform the user via the internal messaging system.

So I am stumped on how to implement this. I thought an Async Controller was the right way to go, but if I understand all the stuff I've been seeing - it's not. Feel free to correct me. I implemented a version using Async but when addressing the one problem it had, I was informed that I was doing it wrong anyway.

So uh...help? I'm all ears.

tereško
  • 58,060
  • 25
  • 98
  • 150
  • is it acceptable to write an external companion application ? if you look at what MS did with Office + SharePoint, you will see an upload manager responsible for uploading documents. For your case, a simple approach may be to use a SilverLight out-of-browser app, or a clickonce app. It's not the ultimate solution, but it may works. – Steve B Jan 05 '12 at 15:12
  • maybe this can help too : http://www.codeproject.com/KB/webforms/FileUploadWithProgrss.aspx – Steve B Jan 05 '12 at 15:14
  • Can't do an external app. I looked at that link - the progress indicator is kind of the problem. I want the user to be able to move elsewhere in the application while the file is uploading. So I was thinking there would be some way to establish a background connection that's handling the file, while the user goes on their merry way. – MonkRocker Jan 05 '12 at 16:23
  • I'm starting to think that a self-closing popup window might be the only way. (blah). – MonkRocker Jan 05 '12 at 16:25

1 Answers1

0

If you can use 3rd party controls then take a look at the Telerik controls:

http://www.telerik.com/products/aspnet-mvc/upload.aspx

It has an Asynchronous File Upload control.

Dismissile
  • 32,564
  • 38
  • 174
  • 263
  • Oops. Forgot to mention that my budget here is ZERO. So yeah - 3rd party stuff is a no-no unless it's free for commercial environments. – MonkRocker Jan 05 '12 at 16:24
  • Unfortunate. I always try and compare what it would cost to get a license for a third party component versus how much it would cost me to implement the functionality myself. If it would take me 100 hours to implement an asynchronous file upload and it only costs $500 for a license, then I would probably get a license for the component...unless I'm only charging $5 an hour :) – Dismissile Jan 05 '12 at 17:05