Recent news

Tuesday, 3 May 2016

jQuery File Upload With Upload File Validation





jQuery File Upload is a jquery file upload plugin. This plugin upload file without refreshing hte page. With the help of this plugin you can validate the upload by looking the preview before upload. This plugin you can use in multiple technology like HP, Python, Ruby on Rails, Java, Node.js, Go etc.

Desktop browsers
  •     Google Chrome
  •     Apple Safari 4.0+
  •     Mozilla Firefox 3.0+
  •     Opera 11.0+
  •     Microsoft Internet Explorer 6.0+

Mobile browsers
  •     Apple Safari on iOS 6.0+
  •     Google Chrome on iOS 6.0+
  •     Google Chrome on Android 4.0+
  •     Default Browser on Android 2.3+
  •     Opera Mobile 12.0+

How To Use

1. Add the below library reference

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/vendor/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>


2. Now add the below html tag.

<input id="fileupload" type="file" name="files[]" data-url="server/php/" multiple>

Here PHP have been used

3. Add the below code to upload the file
  
 $(function () {
        $('#fileupload').fileupload({
            dataType: 'json',
            done: function (e, data) {
                $.each(data.result.files, function (index, file) {
                    $('').text(file.name).appendTo(document.body);
                });
            }
        });
    });



How to use this plugin in your application CLICK HERE



Pranav Singh Author: Pranav Singh

Hello, I am Author of this blog. The main purpose of this blog is to provide all the jQuery plugins which is helpful in designing and developing a web application in a single location from the web.

Previous
Next Post »

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles