Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danialfarid committed Sep 9, 2013
2 parents 3d7b546 + 38a3003 commit 05af3ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var MyCtrl = [ '$scope', '$http', function($scope, $http) {
for (var i = 0; i < $files.length; i++) {
var $file = $files[i];
$http.uploadFile({
url: 'my/upload/url',
url: 'server/upload/url', //upload.php script, node.js route, or servlet uplaod url)
data: {myObj: $scope.myModelObj},
file: $file
}).then(function(data, status, headers, config) {
Expand All @@ -41,9 +41,9 @@ var MyCtrl = [ '$scope', '$http', function($scope, $http) {
```


You also need **FileAPI.min.js** and **FileAPI.flash.swf** files. They will be loaded on demand for the browsers that do not support HTML5 FormData but have support for Flash (For example IE9+)
So they are just there for as polyfill for HTML5 and they will be ignored and not loaded if your browser already supports FormData.
**Note**: IE8 is not supported by FileAPI.
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. IE9+).
For HTML5 FromData supported browsers they will be ignored (not loaded).
**Note**: IE8 is not supported since FileAPI doesn't support it. The good news is that google and github have dropped IE8 support too.

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.
```script
Expand All @@ -60,7 +60,7 @@ If JQuery is not included in your page then it will be loaded from google CDN fo

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/0.1.1/angular-file-upload.js](//cdn.jsdelivr.net/angular.file-upload/0.1.1/angular-file-upload.js)
If you wish to use CDN to include the script files you can use this CDN: [http//cdn.jsdelivr.net/angular.file-upload/0.1.4/angular-file-upload.js](//cdn.jsdelivr.net/angular.file-upload/0.1.1/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 IE.

crossdomain.xml (Only needed if you are using CDN instead of having the js/swf files on your server)
Expand All @@ -71,6 +71,8 @@ crossdomain.xml (Only needed if you are using CDN instead of having the js/swf f
</cross-domain-policy>
```

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).

Let [me](mailto:[email protected]) know if you see any bug or open an [issue](https://github.com/danialfarid/angular-file-upload/issues).


Expand Down

0 comments on commit 05af3ee

Please sign in to comment.