Top Related Projects
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
The next open source file uploader for web browsers :dog:
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
Quick Overview
WebUploader is a modern, feature-rich file upload library for the web. It provides a simple and intuitive interface for uploading files, with support for multiple file selection, progress tracking, and automatic retries on failure. The library is designed to be highly customizable and extensible, making it a versatile choice for a wide range of web applications.
Pros
- Robust File Handling: WebUploader supports a wide range of file types, including images, documents, and archives, and can handle large file uploads with ease.
- Responsive and Accessible: The library is designed to be responsive and accessible, with a clean and modern user interface that works well on a variety of devices and screen sizes.
- Customizable and Extensible: WebUploader is highly customizable, with a range of options and events that allow developers to tailor the library to their specific needs. It also supports a plugin system for adding additional functionality.
- Cross-Browser Compatibility: The library is designed to work seamlessly across a wide range of modern web browsers, ensuring a consistent user experience.
Cons
- Dependency on jQuery: WebUploader relies on the jQuery library, which may be a drawback for developers who prefer to use a more lightweight or modern JavaScript framework.
- Limited Documentation: While the library is well-documented, the documentation could be more comprehensive, especially for more advanced use cases.
- Potential Performance Issues: Depending on the size and number of files being uploaded, WebUploader may experience performance issues, especially on older or less powerful devices.
- Lack of Native File Handling: WebUploader relies on the browser's built-in file handling capabilities, which may not always provide the level of control or customization that some developers require.
Code Examples
Here are a few examples of how to use WebUploader in your web application:
- Basic File Upload:
var uploader = WebUploader.create({
// Required: Set the file upload target URL.
server: 'http://example.com/upload',
// Required: Select the file input element.
pick: '#filePicker'
});
// Listen for the 'uploadSuccess' event and handle the response.
uploader.on('uploadSuccess', function(file, response) {
console.log('File uploaded successfully:', response);
});
- Handling Multiple File Uploads:
var uploader = WebUploader.create({
// Required: Set the file upload target URL.
server: 'http://example.com/upload',
// Required: Select the file input element.
pick: '#filePicker',
// Enable multiple file selection.
multiple: true
});
// Listen for the 'uploadProgress' event and update the UI.
uploader.on('uploadProgress', function(file, percentage) {
console.log('Upload progress for file:', file.name, percentage * 100 + '%');
});
- Customizing the UI:
var uploader = WebUploader.create({
// Required: Set the file upload target URL.
server: 'http://example.com/upload',
// Required: Select the file input element.
pick: {
id: '#filePicker',
// Customize the file picker button.
label: 'Select Files'
},
// Customize the upload button.
formData: {
uid: 123
}
});
- Handling Errors and Retries:
var uploader = WebUploader.create({
// Required: Set the file upload target URL.
server: 'http://example.com/upload',
// Required: Select the file input element.
pick: '#filePicker',
// Enable automatic retries on failure.
auto: true,
// Set the maximum number of retries.
chunkRetry: 3
});
// Listen for the 'uploadError' event and handle the error.
uploader.on('uploadError', function(file, reason) {
console.error('Error uploading file:', file.name, reason);
});
Getting Started
To get started with WebUploader, follow these steps:
- Include the WebUploader CSS and JavaScript files in your HTML:
Competitor Comparisons
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
Pros of jQuery-File-Upload
- More mature and widely adopted project with a larger community
- Extensive documentation and examples available
- Supports a wider range of browsers, including older versions
Cons of jQuery-File-Upload
- Heavier dependency on jQuery, which may not be ideal for modern projects
- Less focus on mobile-specific features compared to WebUploader
Code Comparison
WebUploader:
var uploader = WebUploader.create({
pick: '#filePicker',
server: '/upload.php'
});
uploader.on('fileQueued', function(file) {
// File added to queue
});
jQuery-File-Upload:
$('#fileupload').fileupload({
url: '/upload.php',
done: function (e, data) {
// File upload completed
}
});
Both libraries offer similar functionality for file uploading, but WebUploader provides a more modern API structure. jQuery-File-Upload relies more heavily on jQuery conventions and callbacks.
WebUploader focuses on providing a flexible and customizable upload solution with better support for mobile devices and modern web applications. It offers features like chunked uploads and a more streamlined API.
jQuery-File-Upload, being an older and more established project, has broader browser support and a larger ecosystem of plugins and extensions. It's well-suited for projects that already use jQuery and require compatibility with older browsers.
The next open source file uploader for web browsers :dog:
Pros of Uppy
- More active development with frequent updates and releases
- Extensive plugin ecosystem for added functionality
- Better support for modern browsers and frameworks
Cons of Uppy
- Larger file size and potentially higher resource usage
- Steeper learning curve due to more complex architecture
Code Comparison
WebUploader:
var uploader = WebUploader.create({
pick: '#filePicker',
server: '/upload.php'
});
uploader.on('fileQueued', function(file) {
// File added to queue
});
Uppy:
const uppy = new Uppy()
.use(Dashboard, { trigger: '#select-files' })
.use(XHRUpload, { endpoint: '/upload' })
uppy.on('file-added', (file) => {
// File added to Uppy
})
Key Differences
- Uppy offers a more modular approach with plugins
- WebUploader has a simpler API but less flexibility
- Uppy provides a more modern and customizable UI out of the box
Community and Ecosystem
- Uppy has a larger and more active community
- More third-party integrations available for Uppy
- WebUploader has better documentation in Chinese
Performance
- WebUploader may have slightly better performance for basic use cases
- Uppy offers better handling of large files and concurrent uploads
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.
Pros of Fine Uploader
- More comprehensive documentation and examples
- Wider browser support, including older versions
- Offers both jQuery and non-jQuery versions
Cons of Fine Uploader
- Larger file size and potentially heavier resource usage
- Less focus on modern, mobile-friendly interfaces
Code Comparison
Fine Uploader:
var uploader = new qq.FineUploader({
element: document.getElementById('uploader'),
request: {
endpoint: '/server/upload'
}
});
WebUploader:
var uploader = WebUploader.create({
pick: '#picker',
server: '/server/upload'
});
Additional Notes
Both Fine Uploader and WebUploader are file upload libraries for web applications. Fine Uploader offers more features and broader compatibility, making it suitable for complex projects with diverse browser support requirements. WebUploader, developed by Baidu's FEX team, is more lightweight and focuses on modern web standards, making it a good choice for projects targeting newer browsers and mobile devices.
Fine Uploader has a larger community and more frequent updates, while WebUploader has strong support in the Chinese developer community. The choice between the two depends on specific project requirements, target audience, and desired features.
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Pros of flow.js
- Lightweight and focused on chunk-based file uploads
- Better cross-browser compatibility, including older browsers
- More active development and community support
Cons of flow.js
- Less feature-rich compared to WebUploader
- Requires more custom implementation for advanced features
- Limited built-in UI components
Code Comparison
WebUploader:
var uploader = WebUploader.create({
pick: '#filePicker',
server: '/upload.php'
});
uploader.on('fileQueued', function(file) {
// File added to queue
});
flow.js:
var flow = new Flow({
target: '/upload.php',
chunkSize: 1024 * 1024
});
flow.assignBrowse(document.getElementById('filePicker'));
flow.on('fileAdded', function(file, event) {
// File added to queue
});
Both libraries provide similar functionality for file uploads, but WebUploader offers more built-in features and UI components out of the box. flow.js focuses on core chunked upload functionality, allowing for more customization but requiring additional implementation for advanced features. WebUploader has a more comprehensive API, while flow.js is lighter and more flexible for specific use cases.
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
Pros of Dropzone
- More active development and maintenance
- Extensive documentation and examples
- Wider browser compatibility, including mobile support
Cons of Dropzone
- Larger file size (~ 50KB minified)
- Less customizable UI out of the box
- Limited built-in features compared to WebUploader
Code Comparison
WebUploader:
var uploader = WebUploader.create({
pick: '#filePicker',
server: '/upload.php'
});
uploader.on('fileQueued', function(file) {
// File added to queue
});
Dropzone:
Dropzone.options.myDropzone = {
url: "/upload.php",
init: function() {
this.on("addedfile", function(file) {
// File added to dropzone
});
}
};
Both libraries provide easy-to-use APIs for file uploading, but WebUploader offers more granular control over the upload process, while Dropzone focuses on simplicity and ease of integration. WebUploader's chunk upload feature is more advanced, making it suitable for large file uploads. Dropzone's drag-and-drop interface is more polished out of the box, requiring less customization for a modern look and feel.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ä¸å对使ç¨é®é¢è¿è¡çå¤ï¼å¦ææå¸æçåè½æ¹è¿æè bugfixå¯ä»¥æ交PR
WebUploader æ件ä¸ä¼
WebUploaderæ¯ä¸ä¸ªç®åç以HTML5为主ï¼FLASHä¸ºè¾ çç°ä»£æ件ä¸ä¼ ç»ä»¶ãå¨ç°ä»£çæµè§å¨éé¢è½å ååæ¥HTML5çä¼å¿ï¼åæ¶åä¸æå¼ä¸»æµIEæµè§å¨ï¼å»¶ç¨åæ¥çFLASHè¿è¡æ¶ï¼å ¼å®¹IE6+ï¼Andorid 4+ï¼IOS 6+ã两å¥è¿è¡æ¶ï¼åæ ·çè°ç¨æ¹å¼ï¼å¯ä¾ç¨æ·ä»»æéç¨ã
æ¯æ大æ件åç并åä¸ä¼ ï¼æ大çæé«äºæ件ä¸ä¼ æçã
- å®ç½ï¼ http://fex.baidu.com/webuploader/
- ISSUESï¼https://github.com/fex-team/webuploader/issues
æ¯æ
代ç è¯å®åå¨å¾å¤ä¸è¶³åéè¦ä¼åçå°æ¹ï¼æ¬¢è¿å¤§å®¶æ交 prãæ谢以ä¸ä»£ç è´¡ç®è , æåä¸åå åã
@zenshï¼@ushelpï¼@duanlixinã
ç¹æ§
åçã并å
åçä¸å¹¶åç»åï¼å°ä¸ä¸ªå¤§æ件åå²æå¤åï¼å¹¶åä¸ä¼ ï¼æ大å°æé«å¤§æ件çä¸ä¼ é度ã
å½ç½ç»é®é¢å¯¼è´ä¼ è¾é误æ¶ï¼åªéè¦éä¼ åºéåçï¼èä¸æ¯æ´ä¸ªæ件ãå¦å¤åçä¼ è¾è½å¤æ´å å®æ¶çè·è¸ªä¸ä¼ è¿åº¦ã
é¢è§ãå缩
æ¯æ常ç¨å¾çæ ¼å¼jpg,jpeg,gif,bmp,pngé¢è§ä¸å缩ï¼èçç½ç»æ°æ®ä¼ è¾ã
解æjpegä¸çmetaä¿¡æ¯ï¼å¯¹äºåç§orientationåäºæ£ç¡®çå¤çï¼åæ¶å缩åä¸ä¼ ä¿çå¾ççææåå§metaæ°æ®ã
å¤éå¾æ·»å æ件
æ¯ææ件å¤éï¼ç±»åè¿æ»¤ï¼ææ½(æ件&æ件夹)ï¼å¾çç²è´´åè½ã
ç²è´´åè½ä¸»è¦ä½ç°å¨å½æå¾çæ°æ®å¨åªåæ¿ä¸æ¶ï¼æªå±å·¥å ·å¦QQ(Ctrl + ALT + A), ç½é¡µä¸å³å»å¾çç¹å»å¤å¶ï¼ï¼Ctrl + V便å¯æ·»å æ¤å¾çæ件ã
HTML5 & FLASH
å ¼å®¹ä¸»æµæµè§å¨ï¼æ¥å£ä¸è´ï¼å®ç°äºä¸¤å¥è¿è¡æ¶æ¯æï¼ç¨æ·æ éå ³å¿å é¨ç¨äºä»ä¹å æ ¸ã
åæ¶Flashé¨å没æåä»»ä½UIç¸å ³çå·¥ä½ï¼æ¹ä¾¿ä¸å ³å¿flashçç¨æ·æ©å±åèªå®ä¹ä¸å¡éæ±ã
MD5ç§ä¼
å½æ件ä½ç§¯å¤§ãéæ¯è¾å¤æ¶ï¼æ¯æä¸ä¼ ååæ件md5å¼éªè¯ï¼ä¸è´åå¯ç´æ¥è·³è¿ã
å¦ææå¡ç«¯ä¸å端ç»ä¸ä¿®æ¹ç®æ³ï¼å段md5ï¼å¯å¤§å¤§æåéªè¯æ§è½ï¼èæ¶å¨20mså·¦å³ã
ææ©å±ãå¯æå
éç¨å¯æåæºå¶, å°å个åè½ç¬ç«æäºå°ç»ä»¶ï¼å¯èªç±æé ã
éç¨AMDè§èç»ç»ä»£ç ï¼æ¸ æ°æäºï¼æ¹ä¾¿é«çº§ç©å®¶æ©å±ã
Top Related Projects
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
The next open source file uploader for web browsers :dog:
Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.
A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot