开发者

Best practices doing big file upload on the web with progressive enhancement

I'm building an HTML form with which the user should be able to upload big files up to ~100MB.

My users could be coming from anyw开发者_如何学运维here so I can't count on a broadband connection, modern browser or availability of Javascript/Flash. For the users who do have these "extras" I'd like to offer a better experience like some form of feedback on the process and a flexible form.

The only thing that I can think of that can go wrong is a server timeout. But as I've never built functionality like this I'd like to know what other people's best practices and most serious problems in this area are.

Not entirely relevant but the backend is in PHP.


If your backend is PHP then among other things you need to look at upload_max_filesize. Most configuration issues are covered here. Making your app verify and act on the parameters of runtime environment is also a good idea because it increases fault tolerance.

Using Flash on the frontend is something I would not recommend because it tends to fail with large files. And without Javascript, process feedback isn't possible at all except for the built-in features of a browser. The best experience you can provide without Javascript is by placing the file upload form into an iframe so that the containing page won't disappear during the upload.

For normal scenarios using a combination of APC and lightweight AJAX is a good choice. IBM website has an implementation walkthrough on the subject.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜