Skip to content

Commit 61d6253

Browse files
committed
1 parent 9930079 commit 61d6253

File tree

7 files changed

+52
-39
lines changed

7 files changed

+52
-39
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,13 @@ Button like link.
13841384
<a name="Changelog"></a>
13851385
## Changelog
13861386
1387+
### 2.0.4
1388+
<ul>
1389+
<li>+ #176: Add params to the beginning of form</li>
1390+
<li>+ #190: Add 204 as a successful response</li>
1391+
<li>+ #192: many bugfixes; + `retry` & `multipass` options; + QUnit-tests for BigSizeImage</li>
1392+
</ul>
1393+
13871394
### 2.0.3
13881395
<ul>
13891396
<li>+ QUnit-tests for iframe-transport</li>

dist/FileAPI.html5.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.3 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.4 - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.3b',
281+
version: '2.0.4',
282282

283283
cors: false,
284284
html5: true,
@@ -1174,7 +1174,8 @@
11741174
});
11751175
}
11761176
else {
1177-
options.complete(proxyXHR.status == 200 || proxyXHR.status == 201 ? false : (proxyXHR.statusText || 'error'), proxyXHR, options);
1177+
var successful = proxyXHR.status == 200 || proxyXHR.status == 201 || proxyXHR.status == 204;
1178+
options.complete(successful ? false : (proxyXHR.statusText || 'error'), proxyXHR, options);
11781179
// Mark done state
11791180
_complete = true;
11801181
}
@@ -1279,6 +1280,18 @@
12791280
, postNameConcat = api.postNameConcat
12801281
;
12811282

1283+
// Append data
1284+
_each(options.data, function add(val, name){
1285+
if( typeof val == 'object' ){
1286+
_each(val, function (v, i){
1287+
add(v, postNameConcat(name, i));
1288+
});
1289+
}
1290+
else {
1291+
Form.append(name, val);
1292+
}
1293+
});
1294+
12821295
(function _addFile(file/**Object*/){
12831296
if( file.image ){ // This is a FileAPI.Image
12841297
queue.inc();
@@ -1338,19 +1351,6 @@
13381351
}
13391352
})(file);
13401353

1341-
1342-
// Append data
1343-
_each(options.data, function add(val, name){
1344-
if( typeof val == 'object' ){
1345-
_each(val, function (v, i){
1346-
add(v, postNameConcat(name, i));
1347-
});
1348-
}
1349-
else {
1350-
Form.append(name, val);
1351-
}
1352-
});
1353-
13541354
queue.check();
13551355
},
13561356

@@ -1917,6 +1917,9 @@
19171917
, renderImageToCanvas = api.renderImageToCanvas
19181918
;
19191919

1920+
// Normalize angle
1921+
deg = deg - Math.floor(deg/360)*360;
1922+
19201923
// For `renderImageToCanvas`
19211924
image._type = this.file.type;
19221925

dist/FileAPI.html5.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/FileAPI.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.3 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.4 - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.3b',
281+
version: '2.0.4',
282282

283283
cors: false,
284284
html5: true,
@@ -1174,7 +1174,8 @@
11741174
});
11751175
}
11761176
else {
1177-
options.complete(proxyXHR.status == 200 || proxyXHR.status == 201 ? false : (proxyXHR.statusText || 'error'), proxyXHR, options);
1177+
var successful = proxyXHR.status == 200 || proxyXHR.status == 201 || proxyXHR.status == 204;
1178+
options.complete(successful ? false : (proxyXHR.statusText || 'error'), proxyXHR, options);
11781179
// Mark done state
11791180
_complete = true;
11801181
}
@@ -1279,6 +1280,18 @@
12791280
, postNameConcat = api.postNameConcat
12801281
;
12811282

1283+
// Append data
1284+
_each(options.data, function add(val, name){
1285+
if( typeof val == 'object' ){
1286+
_each(val, function (v, i){
1287+
add(v, postNameConcat(name, i));
1288+
});
1289+
}
1290+
else {
1291+
Form.append(name, val);
1292+
}
1293+
});
1294+
12821295
(function _addFile(file/**Object*/){
12831296
if( file.image ){ // This is a FileAPI.Image
12841297
queue.inc();
@@ -1338,19 +1351,6 @@
13381351
}
13391352
})(file);
13401353

1341-
1342-
// Append data
1343-
_each(options.data, function add(val, name){
1344-
if( typeof val == 'object' ){
1345-
_each(val, function (v, i){
1346-
add(v, postNameConcat(name, i));
1347-
});
1348-
}
1349-
else {
1350-
Form.append(name, val);
1351-
}
1352-
});
1353-
13541354
queue.check();
13551355
},
13561356

@@ -1917,6 +1917,9 @@
19171917
, renderImageToCanvas = api.renderImageToCanvas
19181918
;
19191919

1920+
// Normalize angle
1921+
deg = deg - Math.floor(deg/360)*360;
1922+
19201923
// For `renderImageToCanvas`
19211924
image._type = this.file.type;
19221925

dist/FileAPI.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/FileAPI.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
* FileAPI (core object)
185185
*/
186186
api = {
187-
version: '2.0.3b',
187+
version: '2.0.4',
188188

189189
cors: false,
190190
html5: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fileapi",
33
"exportName": "FileAPI",
4-
"version": "2.0.3",
4+
"version": "2.0.4",
55
"devDependencies": {
66
"grunt": "~0.4.0",
77
"grunt-version": "~0.2.2",

0 commit comments

Comments
 (0)