Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property '0' of undefined #59

Open
vishnu038 opened this issue Jan 13, 2016 · 0 comments
Open

Cannot read property '0' of undefined #59

vishnu038 opened this issue Jan 13, 2016 · 0 comments

Comments

@vishnu038
Copy link

In RegisterController.js

function saveUpdatedProfile() {

var editProfile={

            "profileDetails":{
                "firstName":$scope.firstName,
                "lastName":$scope.lastName,
                "dob"      :$scope.dob,
                "eMailId":$scope.eMailId,

                  "ImageProofContent":$scope.imageProof[0].base64,
                 "ImageProofType":$scope.imageProof[0].filetype,

}

                           <input type="file" ng-model="imageProof" name="imageProof"  accept="image/jpg, zip" maxsize="5000" required base-sixty-four-input>
                           <img ng-show="form.imageProof.$valid" ngf-thumbnail="imageProof" class="thumb">
                          <span ng-show="form.imageProof.$dirty && form.imageProof.$error.required" class="help-block">Files must not exceed 5000 KB</span>
                        
                           <span ng-show="form.imageProof.$error.maxSize" class="help-block">File too large: max 1M</span>

i want the form to allow without selecting imageProof , form can be submiited without the imageproof .

Working fine when i select a file , getting this is when i am not selecting any file.
i have to send base64 and fileType to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant