我正在做一个跨平台 web 应用。我希望它能适应从智能手机到平板到 pc。我用了 jquery、bootstrap。然后,我需要一个 ajax 文件功能,后台用 carrierwave,前端框架正在找。有没有满足跨平台需要的 ajax 文件上传框架呢?哪一个?求推荐。谢谢。。
第一个推荐:jQuery File Upload https://github.com/blueimp/jQuery-File-Upload 对 pc 和 android 的支持都很好,ios 的支持欠缺了一点。Iphone4s 用的都还是 safari5.0。
Desktop browsers
The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions: Google Chrome Apple Safari 4.0+ Mozilla Firefox 3.0+ Opera 11.0+ Microsoft Internet Explorer 6.0+ Mobile browsers
The File Upload plugin has been tested with and supports the following 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+
FEATUERS Multiple file upload: Drag & Drop support: Upload progress bar: Cancelable uploads: Resumable uploads: Chunked uploads: Client-side image resizing: Preview images, audio and video: No browser plugins (e.g. Adobe Flash) required: Graceful fallback for legacy browsers: HTML file upload form fallback: Cross-site file uploads: Multiple plugin instances: Customizable and extensible: Multipart and file contents stream uploads: Compatible with any server-side application platform:
第二个强大的存在:Fine Uploader https://github.com/Widen/fine-uploader 搞不懂为啥用的是 GPLv3,下载又要买 License。
BROWSER SUPPORT Does NOT require Flash, jQuery, or any external libraries.
IE7+ (including IE10) Firefox Safari (OS X) Chrome IOS6 Android
FEATURES Multiple file select, progress bar Drag-and-drop to upload Cancel uploads Auto and manual upload Customizable failure messages Auto/manual retry Multiple built-in validation rules Custom validation rules Over a dozen possible callbacks Send parameters with each file Upload directories via drag & drop Submit files via the API File chunking/partitioning Resume previously failed/interrupted files Delete uploaded files CORS (cross-origin) support Paste to upload Upload from mobile camera Edit file names Upload directly to Amazon S3