1313## FileAPI
1414A set of javascript tools for working with files.
1515
16+
17+ <a name =" FileAPI.setup " ></a >
18+ ### Setup
19+ Connecting the library to your project.
20+ If you need a CORS, then edit the ` crossdomain.xml ` and put it in the root of remote domain.
21+
22+ ``` html
23+ <script >
24+ window .FileAPI = {
25+ debug: false // debug mode, see Console
26+ , cors: true // if used CORS
27+ , staticPath: ' /js/FileAPI/dist/' // path to '*.swf'
28+ };
29+ </script >
30+ <script src =" /js/FileAPI/dist/FileAPI.min.js" ></script >
31+
32+ <!-- OR -->
33+
34+ <script >
35+ window .FileAPI = { /* options */ };
36+ require ([' FileAPI' ], function (FileAPI ){
37+ // ...
38+ });
39+ </script >
40+ ```
41+
42+ ---
43+
44+
1645<a name =" FileAPI.getFiles " ></a >
1746### getFiles(input` :HTMLInputElement|Event|$.Event ` )` :Array `
1847Get files from ` input ` element or ` event ` object, also support ` jQuery ` .
@@ -32,6 +61,7 @@ FileAPI.event.on(el, function (evt/**Event*/){
3261
3362---
3463
64+
3565<a name =" FileAPI.getInfo " ></a >
3666### getInfo(file` :Object ` , callback` :Function ` )` :void `
3767Get info of file (see also: FileAPI.addInfoReader).
@@ -988,8 +1018,10 @@ All the other codes - fatal error, user's involvement is recommend.
9881018
9891019---
9901020
1021+ <a name =" buttons.examples " ></a >
9911022## Buttons examples
9921023
1024+ <a name =" buttons.examples.base " ></a >
9931025### Base
9941026Simple input[ type="file"]
9951027
@@ -1001,6 +1033,7 @@ Simple input[type="file"]
10011033
10021034---
10031035
1036+ <a name =" buttons.examples.button " ></a >
10041037### Button
10051038Stylized button.
10061039
@@ -1050,6 +1083,7 @@ Stylized button.
10501083---
10511084
10521085
1086+ <a name =" buttons.examples.link " ></a >
10531087### Link
10541088Button like link.
10551089
@@ -1102,29 +1136,33 @@ Button like link.
11021136### 2.0.0
11031137<ul >
11041138<li>+ FileAPI.Camera (HTML5 and Flash fallback)</li>
1105- <li>+ jquery.fileapi.js</li>
1139+ <li>+ jquery.fileapi.js, see <a href="http://rubaxa.github.io/jquery.fileapi/">demo</a> </li>
11061140<li>+ npm support</li>
11071141<li>+ grunt support</li>
1142+ <li>+ requirejs support</li>
11081143<li>+ [#80](https://https://github.com/mailru/FileAPI/issues/80): FileAPI.Image.fn.overlay</li>
11091144 <li >` imageTransform ` — now supports: ` crop ` , ` type ` , ` quality ` and ` overlay ` properties.</li >
11101145<li >Improved the documentation</li >
11111146</ul >
11121147
11131148
11141149### 1.2.5
1115- * [ #86 ] ( https://github.com/mailru/FileAPI/issues/86 ) : Smarter upload recovery
1116- * [ #87 ] ( https://github.com/mailru/FileAPI/issues/87 ) : Fixed upload files into browsers that do not support FormData
1117- * Fixed support "accept" attribute for Flash.
1118- * Fixed detection of HTML5 support for FireFox 3.6
1119- * + FileAPI.html5 option, default "true"
1120-
1150+ <ul >
1151+ <li>[#86](https://github.com/mailru/FileAPI/issues/86): Smarter upload recovery</li>
1152+ <li>[#87](https://github.com/mailru/FileAPI/issues/87): Fixed upload files into browsers that do not support FormData</li>
1153+ <li>Fixed support "accept" attribute for Flash.</li>
1154+ <li>Fixed detection of HTML5 support for FireFox 3.6</li>
1155+ <li> + FileAPI.html5 option, default "true"</li>
1156+ </ul >
11211157
11221158### 1.2.4
1123- * Fixed auto orientation image by EXIF (Flash)
1124- * Fixed image dimensions after rotate (Flash)
1125- * [ #82 ] ( https://github.com/mailru/FileAPI/issues/82 ) : "undefined" data-fields cause exceptions
1126- * [ #83 ] ( https://github.com/mailru/FileAPI/issues/83 ) : Allow requests without files
1127- * [ #84 ] ( https://github.com/mailru/FileAPI/pull/84 ) : Fixed connection abort when waiting for connection recovery
1159+ <ul >
1160+ <li>Fixed auto orientation image by EXIF (Flash)</li>
1161+ <li>Fixed image dimensions after rotate (Flash)</li>
1162+ <li>[#82](https://github.com/mailru/FileAPI/issues/82): "undefined" data-fields cause exceptions</li>
1163+ <li>[#83](https://github.com/mailru/FileAPI/issues/83): Allow requests without files</li>
1164+ <li>[#84](https://github.com/mailru/FileAPI/pull/84): Fixed connection abort when waiting for connection recovery</li>
1165+ </ul >
11281166
11291167
11301168### 1.2.3
0 commit comments