Skip to content

Commit e24dc9e

Browse files
committed
Merge branch 'hotfixes'
2 parents 8bf361f + 963ab1c commit e24dc9e

File tree

8 files changed

+46
-20
lines changed

8 files changed

+46
-20
lines changed

dist/FileAPI.flash.swf

33 KB
Binary file not shown.

dist/FileAPI.html5.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.15 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.16 - 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

@@ -283,7 +283,7 @@
283283
* FileAPI (core object)
284284
*/
285285
api = {
286-
version: '2.0.15',
286+
version: '2.0.16',
287287

288288
cors: false,
289289
html5: true,
@@ -1366,7 +1366,13 @@
13661366
queue.inc();
13671367

13681368
file.toData(function (err, image){
1369-
// @todo: error
1369+
// @todo: требует рефакторинга и обработки ошибки
1370+
if (file.file) {
1371+
image.type = file.file.type;
1372+
image.quality = file.matrix.quality;
1373+
filename = file.file && file.file.name;
1374+
}
1375+
13701376
filename = filename || (new Date).getTime()+'.png';
13711377

13721378
_addFile(image);

dist/FileAPI.html5.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.

dist/FileAPI.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.15 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.16 - 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

@@ -283,7 +283,7 @@
283283
* FileAPI (core object)
284284
*/
285285
api = {
286-
version: '2.0.15',
286+
version: '2.0.16',
287287

288288
cors: false,
289289
html5: true,
@@ -1366,7 +1366,13 @@
13661366
queue.inc();
13671367

13681368
file.toData(function (err, image){
1369-
// @todo: error
1369+
// @todo: требует рефакторинга и обработки ошибки
1370+
if (file.file) {
1371+
image.type = file.file.type;
1372+
image.quality = file.matrix.quality;
1373+
filename = file.file && file.file.name;
1374+
}
1375+
13701376
filename = filename || (new Date).getTime()+'.png';
13711377

13721378
_addFile(image);

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.

flash/core/src/ru/mail/data/vo/FileVO.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ package ru.mail.data.vo
7575
if ( fileNameParts.length < 2 )
7676
return fileName;
7777

78-
return fileNameParts[0] + 'png';
78+
return fileNameParts[0] + '.png';
7979
}
8080
}
8181

@@ -84,4 +84,4 @@ package ru.mail.data.vo
8484
super();
8585
}
8686
}
87-
}
87+
}

lib/FileAPI.core.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
_rdata = /^data:[^,]+,/,
4646

4747
_toString = {}.toString,
48+
_supportConsoleLog,
49+
_supportConsoleLogApply,
4850

4951

5052
Math = window.Math,
@@ -189,7 +191,7 @@
189191
* FileAPI (core object)
190192
*/
191193
api = {
192-
version: '2.0.15',
194+
version: '2.0.16',
193195

194196
cors: false,
195197
html5: true,
@@ -249,8 +251,8 @@
249251
},
250252

251253
log: function (){
252-
if( api.debug && window.console && console.log ){
253-
if( console.log.apply ){
254+
if( api.debug && _supportConsoleLog ){
255+
if( _supportConsoleLogApply ){
254256
console.log.apply(console, arguments);
255257
}
256258
else {
@@ -1272,7 +1274,13 @@
12721274
queue.inc();
12731275

12741276
file.toData(function (err, image){
1275-
// @todo: error
1277+
// @todo: требует рефакторинга и обработки ошибки
1278+
if (file.file) {
1279+
image.type = file.file.type;
1280+
image.quality = file.matrix.quality;
1281+
filename = file.file && file.file.name;
1282+
}
1283+
12761284
filename = filename || (new Date).getTime()+'.png';
12771285

12781286
_addFile(image);
@@ -1787,7 +1795,13 @@
17871795
});
17881796

17891797

1790-
// @configuration
1798+
// Configuration
1799+
try {
1800+
_supportConsoleLog = !!console.log;
1801+
_supportConsoleLogApply = !!console.log.apply;
1802+
}
1803+
catch (err) {}
1804+
17911805
if( !api.flashUrl ){ api.flashUrl = api.staticPath + 'FileAPI.flash.swf'; }
17921806
if( !api.flashImageUrl ){ api.flashImageUrl = api.staticPath + 'FileAPI.flash.image.swf'; }
17931807
if( !api.flashWebcamUrl ){ api.flashWebcamUrl = api.staticPath + 'FileAPI.flash.camera.swf'; }

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.15",
4+
"version": "2.0.16",
55
"devDependencies": {
66
"connect-busboy": "~0.0.2",
77
"eventemitter2": "~0.4.13",

0 commit comments

Comments
 (0)