title: How to update the angular2 firebase database?
body: <p>I have candidates_list table in firebase database. It contains different parameters like name ,city,skill etc. These all parameters I have submitted through one form.
  After submitting the form the page is redirect to next page where we want submit his resume. I don't know how to update the candidates_list with resume name and path. </p>
  
  <p>My .html file is below</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
          &lt;div class="col-md-3"&gt;
          &lt;/div&gt;
      &lt;div class="col-md-6"&gt;
            &lt;div class="jumbotron"&gt;
  
            &lt;h2&gt;Complete your Profile&lt;/h2&gt;
            &lt;h5 style="color:royalblue;"&gt;Add your updated Resume to get notified by Recruiters&lt;/h5&gt;
            &lt;form&gt;
              &lt;label&gt;Resume&lt;/label&gt;
            &lt;input id="file" name="file" type="file" #fileinput &gt;&lt;br&gt;
  
            &lt;button (click)="upload(fileinput)" type="button" class="btn btn-success"&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
  
  
  
  
            &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My .ts page is </p>
  
  <pre><code>import { Component, OnInit,Input } from '@angular/core';
  import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';
  import * as firebase from 'firebase';
  import { FirebseService } from "app/firebse.service";
  
  @Component({
    selector: 'app-candidate-reg-complete',
    templateUrl: './candidate-reg-complete.component.html',
    styleUrls: ['./candidate-reg-complete.component.css']
  })
  export class CandidateRegCompleteComponent implements OnInit {
  item: FirebaseObjectObservable&lt;any&gt;;
    constructor(private db: AngularFireDatabase,
    private firebaseService:FirebseService) { 
      this.item = db.object('candidates_list');
    }
  
    ngOnInit() {
    }
    upload(documents){
      debugger;
    //  let file=user.files[0];
    //   console.log(file);
    //  console.log(file.name);
    let storageRef=firebase.storage().ref();
  
      for(let selectedFile of[(&lt;HTMLInputElement&gt;document.getElementById('file')).files[0]]){
  
       let path='/resumes/'+selectedFile.name;
        let iRef=storageRef.child(path);
        iRef.put(selectedFile).then((snapshot)=&gt;{
  
         documents.resume=selectedFile.name;
         documents.path=path;
          var Userid=localStorage.getItem('user');
          console.log(documents);
          this.db.object('/candidates_list/'+Userid).update(documents);
        localStorage.setItem('resume',documents.path);
  
        })
   }
  
  }
  }
  
  
  var Userid=localStorage.getItem('user');
  </code></pre>
  
  <p>Here I mean to take the UID of the user which has set into local storage while logging in.
  How to solve this problem. Any solution? Please help me. Thanks in advance</p>