How can I create a file upload using jQuery and ph

2019-07-27 11:42发布

问题:

how can i create a jQuery multiple image upload(upload without refresh page after choose file only displaying image not insert to databse) and submit additional Form Data and submit all with click on button without refresh page data insert to database. jquery and php?

like:
There is in tag form: checkbox, input:text, input:textarea, selection:option and input:file

Upload with PHP know,but do not know upload with jQuery.
Where do I start and what should I use?
give me link would tutorial or explain?
i not use of plugin, and not want get from it idea.

With respect

回答1:

Jquery Ajax File Upload Plugin

http://www.phpletter.com/Demo/AjaxFileUpload-Demo/



回答2:

Use JQuery Ajax File Upload. On server side look for your file in request.



回答3:

I use plupload. Its really simple to use.

Here is the demo page.

Sample code from one of my apps:

uploader = new plupload.Uploader({
                    runtimes: 'html5,gears,flash,silverlight,browserplus',
                    browse_button: 'browse',
                    drop_element: 'uploadContainer',
                    container: 'uploadContainer',
                    max_file_size: '10mb',
                    multi_selection: false,
                    url: 'someFile.php',
                    flash_swf_url: 'http://www.plupload.com/plupload/js/plupload.flash.swf',
                    silverlight_xap_url: 'http://www.plupload.com//plupload/js/plupload.silverlight.xap',
                    filters: [{ title: "Image files", extensions: "jpg,gif,png" },
                              { title: "Pdf files", extensions: "pdf"}]
                });