When I click the start upload button it is redirected, but I do not know my image upload Whether it's done or not
you can see
install gem by adding it to your Gemfile < Now in this path, app / assets / application.js add code >> jquery-fileupload < / Code> This CSS will add all the JS files needed for app / assets / stylesheet / application.css add
* = Jquery.fileupload * = Required jquery.fileupload-ui
You can follow the way to set up or view
this is your Original upload form
& lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JQuery file upload example & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Input id = "fileupload" type = "file" name = "files []" data-url = "server / / php /" multiple & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> & Lt; Script src = "js / vendor / jquery.ui.widget.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / jquery.iframe-transport.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / jquery.fileupload.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Function () {$ ('# fileupload'). Fileupload ({dataType: 'json', done: function (e, data) {$ .ee (data.All files, functions (index, file) { $ ('& Lt; p / & gt;') .text (file.name) .appendTo (document.body);})}}}}}}); & lt; / script & gt; & lt; / Body & gt; & lt; / html & gt;
Hope this helps.
No comments:
Post a Comment