diff --git a/README.md b/README.md index d2bbcfe9..4fda9560 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ New in version 1.0.0: **Click here for DEMO** -Lightweight Angular JS directive to upload files using regular input type file and ajax call. +Lightweight Angular JS directive to upload files using regular input type file or drag&drop file and ajax call. HTML: ```html @@ -50,27 +50,24 @@ var MyCtrl = [ '$scope', '$http', function($scope, $http) { ``` -You also need **FileAPI.min.js** and **FileAPI.flash.swf** files as polyfill using Flash for browsers that does not support HTML5 FormData (i.e. IE8-9). -For HTML5 FromData supported browsers they will be ignored (not loaded). -**Note**: For IE8 on XP Flash needs to be installed. +For the browsers not supporting HTML5 FormData you need [FileAPI](https://github.com/mailru/FileAPI) files **FileAPI.min.js** and **FileAPI.flash.swf** as a polyfill. These files will not be loaded to the client if the browser supports HTML5 FormData (no extra load). +**Note**: Flash needs to be installed on the client browser if it doesn't support HTML5. -The js file **FileAPI.min.js** must be placed beside angular-file-upload.js. If the swf file **FileAPI.flash.swf** is placed in another directory on the server do the following step, unless they will be automatically loaded from the same location as angular-file-upload.js. +You can put **FileAPI.min.js** and flash files beside angular-file-upload.js on your server so they will be loaded automatically. Alternatively you can use the following script to set the FileAPI load path: ```script ``` -This code needs to be before `` - -For browsers not supporting HTML5 FormData, [FileAPI](https://github.com/mailru/FileAPI) polyfill is used to upload file with Flash. Two extra files will be loaded for these browsers: FileAPI.min.js and FileAPI.flash.swf. -If JQuery is not included in your page then it will be loaded from google CDN for those browsers. +This needs to be loaded before angular-file-upload.js (place before ``) You can find the sample server code in Java/GAE [here](https://github.com/danialfarid/angular-file-upload/blob/master/src/com/df/angularfileupload/FileUpload.java). -If you wish to use CDN to include the script files you can use this CDN: [http//cdn.jsdelivr.net/angular.file-upload/1.0.0/angular-file-upload.js](//cdn.jsdelivr.net/angular.file-upload/1.0.0/angular-file-upload.js) - If you use this CDN you need to add a crossdomain.xml file to your root server in order for the Adbobe Flash to be able to upload the file for browsers not supporting FormData. +If you wish to use CDN to include the script files you can use this CDN: [http//cdn.jsdelivr.net/angular.file-upload/1.0.2/angular-file-upload.js](//cdn.jsdelivr.net/angular.file-upload/1.0.2/angular-file-upload.js) +If you use this CDN you need to add a crossdomain.xml file to your root server in order for the Adbobe Flash to be able to upload the file for browsers not supporting FormData. crossdomain.xml (Only needed if you are using CDN instead of having the js/swf files on your server) ```crossdomain.xml @@ -81,7 +78,7 @@ crossdomain.xml (Only needed if you are using CDN instead of having the js/swf f ``` If you use this module you can give it a thumbs up at [http://ngmodules.org/modules/angular-file-upload](http://ngmodules.org/modules/angular-file-upload). -The module is registered at bower with the name **"angularjs-file-upload"** (notice 'js' after angular): bower install angularjs-file-upload#1.0.0 +The module is registered at bower with the name **"angularjs-file-upload"** (notice 'js' after angular): bower install angularjs-file-upload#1.0.2 Let [me](mailto:danial.farid@gmail.com) know if you see any bug or open an [issue](https://github.com/danialfarid/angular-file-upload/issues).