Skip to content

Commit a0d5288

Browse files
committed
[release] 0.4.0
1 parent a385b3c commit a0d5288

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

dist/uploader.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Uploader - Uploader library implements html5 file upload and provides multiple simultaneous, stable, fault tolerant and resumable uploads
3-
* @version v0.3.2
3+
* @version v0.4.0
44
* @author dolymood <dolymood@gmail.com>
55
* @link https://github.com/simple-uploader/Uploader
66
* @license MIT
@@ -69,6 +69,9 @@ utils.extend(Chunk.prototype, {
6969
},
7070

7171
getTarget: function (target, params) {
72+
if (!params.length) {
73+
return target
74+
}
7275
if (target.indexOf('?') < 0) {
7376
target += '?'
7477
} else {
@@ -280,6 +283,9 @@ utils.extend(Chunk.prototype, {
280283
var query = utils.evalOpts(this.uploader.opts.query, this.file, this, isTest)
281284
query = utils.extend(this.getParams(), query)
282285

286+
// processParams
287+
query = this.uploader.opts.processParams(query)
288+
283289
var target = utils.evalOpts(this.uploader.opts.target, this.file, this, isTest)
284290
var data = null
285291
if (method === 'GET' || paramsMethod === 'octet') {
@@ -371,7 +377,7 @@ var event = _dereq_('./event')
371377
var File = _dereq_('./file')
372378
var Chunk = _dereq_('./chunk')
373379

374-
var version = '0.3.2'
380+
var version = '0.4.0'
375381

376382
var isServer = typeof window === 'undefined'
377383

@@ -469,6 +475,9 @@ Uploader.defaults = {
469475
initialPaused: false,
470476
processResponse: function (response, cb) {
471477
cb(null, response)
478+
},
479+
processParams: function (params) {
480+
return params
472481
}
473482
}
474483

0 commit comments

Comments
 (0)