Skip to content

Commit c5cea48

Browse files
committed
Update README.md
1 parent a438b1f commit c5cea48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ var MyCtrl = [ '$scope', '$upload', function($scope, $upload) {
4646
$scope.onFileSelect = function($files) {
4747
//$files: an array of files selected, each file has name, size, and type.
4848
for (var i = 0; i < $files.length; i++) {
49-
var $file = $files[i];
49+
var file = $files[i];
5050
$scope.upload = $upload.upload({
5151
url: 'server/upload/url', //upload.php script, node.js route, or servlet url
5252
// method: POST or PUT,
5353
// headers: {'headerKey': 'headerValue'}, withCredential: true,
5454
data: {myObj: $scope.myModelObj},
55-
file: $file,
55+
file: file,
5656
// file: $files, //upload multiple files, this feature only works in HTML5 FromData browsers
5757
/* set file formData name for 'Content-Desposition' header. Default: 'file' */
5858
//fileFormDataName: myFile,

0 commit comments

Comments
 (0)