# upload **Repository Path**: mirrors_singod/upload ## Basic Information - **Project Name**: upload - **Description**: iframe and html5 file uploader - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Upload --------------- [](http://spmjs.io/package/arale-upload) iframe and html5 uploader. ⇪ ## 演示 查看演示,你需要 clone 一份代码: ``` $ git clone git://github.com/aralejs/upload $ cd upload $ npm install $ spm install $ node server.js ``` 然后访问:http://localhost:8000/demo.html ## Attributes ```javascript var uploader = new Uploader({ trigger: '#upload-icon', name: 'image', action: '/upload', accept: 'image/*', data: {'xsrf': 'hash'}, multiple: true, error: function(file) { alert(file); }, success: function(response) { alert(response); }, progress: function(event, position, total, percent, files) { console.log(percent); } }); ``` ### trigger `element|selector` trigger 唤出文件选择器,可以是: - 选择器 - element - jQuery Object ### name `string` name 即为 `` 的值,即上传文件时对应的 name。 ### action `url` action 为 `