views:

22

answers:

2

I have a webpage where users can create a database record and select a file they want to upload to the database server. these files can be big, like 100mb.

I dont want the user to wait, so I want the file to be uploaded in the background. So that they can continue with doing other stuff while the file is being uploaded.

Is BITS the way to go for this? Or is that only for Fatclient development? Any good tuterials ?

If BITS is not the way to go, what are my options? An ajax call to a services with the filelocation?

A: 

I don't think BITS will do the trick for you. I've never used it, but it doesn't seem that it can be accessible via a web application - it seems more suited for a windows client app or windows service.

You may want to consider either Andrew Valums AJAX Upload control (http://valums.com/ajax-upload/) or Uploadify (http://www.uploadify.com/). These are both jQuery AJAX controls (and uploadify requires Flash). I work with jQuery for web application development, so I'm partial to these controls. I've used Valums' upload control for several projects and it works very well. I haven't used uploadify in an actual production application because of the Flash requirement (but it looks very nice). I'm sure there are other AJAX upload tools for other JavaScript frameworks.

I hope this helps!

David Hoerster
+1  A: 

If you, by saying "they can continue with doing other stuff", mean that they can do other Ajax requests on the same web page (i.e. not navigating away from it), you can accomplish this with any Flash-based uploader (SWFUpload is one of many). This doesn't require anything but some JavaScript, an <input type="file"> and the embedded Flash uploader.

If you want the user to be able to navigate away from the page initiating the upload, you can't really do it within the browser, at least not until WebSockets are fully implemented in all browsers. Even then, it's going to be quite hard.

asbjornu
With "Do other stuff" I mean browse away indead
Ivo
So you want the user to be able to start an upload on your web page and then punch in www.cnn.com into the address bar and expect the upload to continue? Whether the user navigates from the upload page to another page on your web site or cnn.com is irrelevant; navigating away from the upload page is what matters and what will stop the Flash uploader from finishing.
asbjornu