title: How to add image and data into firebase
body: <p>I want to send/add notification data in database that contains image with some text data so I am not able to add this data in firebase. I tried some code for only data insertion, but it doesn't work and How do I add image in firebase?</p>
  
  <p>I am adding database which is made manually for notification. I want to add further more notifications with image</p>
  
  <p>database</p>
  
  <p><a href="https://i.stack.imgur.com/CgKCw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CgKCw.png" alt="enter image description here"></a></p>
  
  <p>This is my html form</p>
  
  <pre><code>&lt;form method=post enctype="multipart/form-data"&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-md-5"&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label&gt;Title&lt;/label&gt;
                                                  &lt;input type="text" id="title" class="form-control" placeholder="Company" &gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-md-3"&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label&gt;Image&lt;/label&gt;
                                                  &lt;input type="image" class="form-control" placeholder="Image"&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt; 
                                          &lt;div class="col-md-4"&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label for="exampleInputEmail1"&gt;Redeem Steps&lt;/label&gt;
                                                  &lt;input type="text" id="redeem" class="form-control" placeholder="Redeem Steps"&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
  
  
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-md-12"&gt;
                                              &lt;div class="form-group"&gt;
                                                  &lt;label&gt;Description&lt;/label&gt;
                                                  &lt;textarea rows="5" id="description" class="form-control" placeholder="Here can be your description"&gt;&lt;/textarea&gt;
                                              &lt;/div&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
  
                                      &lt;div class="row"&gt;
                                      &lt;div class="col-md-12" &gt;
                                          Image 1 &lt;span style="color:red"&gt;*&lt;/span&gt;&lt;!--&lt;input type="file" id="image" name="img1"  required&gt;--&gt;    
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  
  
                                      &lt;button type="submit" id="submitBtn" class="btn btn-info btn-fill pull-right" onclick="submitclick()"&gt;Send notification&lt;/button&gt;
                                      &lt;div class="clearfix"&gt;&lt;/div&gt;
                                  &lt;/form&gt;
  </code></pre>
  
  <p>this is js file</p>
  
  <pre><code>var title=document.getElementById("title");
  var redeem=document.getElementById("redeem");
  var description=document.getElementById("description");
  var image=document.getElementById("image");
  var submitBtn=document.getElementById("submitBtn");
  var Id=1;
  function submitclick(){
  
      var firebaseref=firebase.database().ref();
  
      var messagetitle=title.value;
      var messageredeem=redeem.value;
      var messagedescription=description.value;
      //var messageimage=image.value;
  
      console.log(messagetitle);
      console.log(messageredeem);
      console.log(messagedescription);
      //console.log(messageimage);
  
  
      //firebaseref.child("notification").set("vinit");
      //firebaseref.child("notification").set("2");
      //firebaseref.child("notification").set("messagedescription");
      //firebaseref.child("notification").set("messageimage");
      firebase.database().ref('notification/'+Id).set({
          title : messagetitle,
          redeem : messageredeem,
          description : messagedescription
          image : messageimage
        });
  
        console.log(Id);
  Id++;
  console.log(Id);
  }
  </code></pre>