Get started with plupload CDN
(GPL-2.0 OR Single Website OR OEM OR Custom Licensing) licensed
Plupload is a popular library for handling file uploads in web applications.
Tags:- cross-browser
- upload
Stable version
Copied!
How to start using plupload CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with plupload CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/plupload/3.1.5/plupload.queue.css" />
<script src="https://cdn.cdnhub.io/plupload/3.1.5/plupload.full.min.js"></script>
</head>
<body>
<div id="file-upload">
<input id="file-input" type="file" multiple />
<button id="start-button" class="button">Start</button>
</div>
<script>
const uploader = new plupload.Uploader({
runtimes: 'html5,flash,silverlight,html4',
browse_button: 'file-input',
container: 'file-upload',
url: 'http://example.com/upload.php',
flash_swf_url: 'path/to/plupload-flash.swf',
silverlight_xap_url: 'path/to/plupload-silverlight.xap',
filters: {
max_file_size: 10 * 1024 * 1024, // 10MB
mime_types: [
{title: "Image files", extensions: "jpg,jpeg,png,gif"}
]
},
init: {
PostInit: function() {
console.log('PostInit');
},
FilesAdded: function(up, files) {
console.log('Files added');
},
BeforeUpload: function(up, file) {
console.log('Before upload');
},
UploadProgress: function(up, file) {
console.log('Upload progress');
},
Error: function(up, err) {
console.log('Error', err);
},
FileUploaded: function(up, file, response) {
console.log('File uploaded', file.name, response.response);
},
QueueEmpty: function() {
console.log('Queue empty');
}
}
});
uploader.init();
document.getElementById('start-button').addEventListener('click', function() {
uploader.start();
});
</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!
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!
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!
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!