Get started with blueimp-file-upload CDN

MIT licensed

Blueimp FileUpload is a popular open-source jQuery plugin for handling file uploads.

Tags:
  • jquery
  • file
  • upload
  • widget
  • multiple
  • selection
  • drag
  • drop
  • progress
  • preview
  • cross-domain
  • cross-site
  • chunk
  • resume
  • gae
  • go
  • python
  • php
  • bootstrap

Stable version

Copied!

How to start using blueimp-file-upload CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with blueimp-file-upload CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/blueimp/10.32.0/css/jquery.fileupload.min.css" referrerpolicy="no-referrer" />
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.cdnhub.io/blueimp-file-upload/10.32.0/js/jquery.fileupload.min.js"></script>
</head>
<body>
    <h1>Blueimp File Upload Example</h1>
    <input type="file" name="files[]" id="fileupload">
    <div id="progress" class="progress"></div>
    <button id="submit">Submit</button>

    <script>
        $(function() {
            $('#fileupload').fileupload({
                url: '/upload', // Replace with your server-side URL
                dataType: 'json',
                autoUpload: true,
                progressall: function(e, data) {
                    var progress = parseInt(data.loaded / data.total * 100, 10);
                    $('#progress .progress-bar').css('width', progress + '%');
                }
            });

            $('#submit').click(function() {
                $('#fileupload').fileupload('submit');
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions