开发者

Asychronous Image Upload in a Form

So I have this form that needs to be filled out by the user. In the form, there is a place to upload an image. Currently, the upload takes place when the user hits "Submit" at the end of the form, however, that causes an up to 30 second delay (due to image size).

What I'm wondering is if there is a way to start that upload while the user is still filling out the form, rather than selecting the image, finishing the form, then uploading it. (This way it really cuts down on the time needed, per form)

The form itself already has a dozen other things it's doing to submit the information to the database and such, so i'开发者_如何学JAVAve been looking into using javascript with an onchange event to get into the javascript, and perhaps from there moving back into php to perform the upload, all while not reloading the page.

Any ideas or suggestions?


There really aren't many ways, the most common one is to use an iframe. Something along the lines of: http://valums.com/ajax-upload/


This has worked very well for me:

jQUploader

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜