How do I upload mp3 blob to firebase Storage
<p>I keep getting a 404 unknown FirebaseError everytime i try to upload a blob of audio data to firebase storage. but when 
i click the link that is generated using the .put(blob), i can see the JSON that is generated. i dont get this error rwhen uploading imagedata from camera plugin.</p>

<p>Error: 
Failed to load resource: the server responded with a status of 404 (Not Found)</p>

<p>{"code":"storage/unknown","message":"Firebase Storage: An unknown error occurred, please check the error payload for server response.","serverResponse":"","name":"FirebaseError"}</p>

<p>Link: <a href="https://firebasestorage.googleapis.com/v0/b/copout-54f4e.appspot.com/o?name=record%2Fcopoutrecording.mp3" rel="nofollow">https://firebasestorage.googleapis.com/v0/b/copout-54f4e.appspot.com/o?name=record%2Fcopoutrecording.mp3</a></p>

<h2>--------------------------------</h2>

<p><strong>System information:</strong>                                                                                                                                                                                                               </p>

<p>Cordova CLI: 6.3.1<br>
Ionic Framework Version: 2.0.0-rc.0-201610131811<br>
Ionic CLI Version: 2.1.1<br>
Ionic App Lib Version: 2.1.1<br>
Ionic App Scripts Version: 0.0.36<br>
OS:<br>
Node Version: v4.6.0                                                                                                                                                                                                                   </p>

<hr>

<p><strong>Code:
<em>index.html</em></strong></p>

<pre><code> &lt;ion-app&gt;&lt;/ion-app&gt;
    &lt;!--fire base data services--&gt;
    &lt;script src="js/firebase.js"&gt;&lt;/script&gt;
 &lt;!--&lt;script src="https://www.gstatic.com/firebasejs/3.5.0/firebase.js"&gt;&lt;/script&gt;--&gt;
&lt;script&gt;
  // Initialize Firebase
  var config = {
     apiKey: "key",
    authDomain: "domain",
    databaseURL: "url",
    storageBucket: "storage",
    messagingSenderId: "id"
  };
  firebase.initializeApp(config);
&lt;/script&gt;
</code></pre>

<p><strong><em>recordpage.ts</em></strong></p>

<pre><code>import { Injectable } from '@angular/core';
import { MediaPlugin } from 'ionic-native';
import {FireBaseData} from './firebase.service';
import { File } from 'ionic-native';

declare var cordova: any;
// firebase
declare var firebase: any;

export enum AudioRecorderState {
Ready,
Recording,
Recorded,
Playing
}

@Injectable()
export class AudioRecorder {
mediaPlugin: MediaPlugin = null;
state: AudioRecorderState = AudioRecorderState.Ready;
mdeastr: string; 
fbd: any;
progress: string; 
file: any;

constructor() {
this.fbd = new FireBaseData();
}

get MediaPlugin(): MediaPlugin {
if (this.mediaPlugin == null) {
this.mediaPlugin = new MediaPlugin("copoutrecording.mp3", null);
}

return this.mediaPlugin;
}

upload() {
var test = JSON.stringify(this.MediaPlugin);

this.file = { name: "copoutrecording.mp3" };

   File.readAsDataURL(cordova.file.externalRootDirectory, this.file.name).then((data: any) =&gt; {
   if (data) {
   var blob = new Blob([data], { type: "audio/mp3" }); 
   this.fbd.uploadrecording(blob);
  }
});
}
</code></pre>

<p>firebase.service.ts</p>

<pre><code>import { Injectable } from '@angular/core';
import { Platform } from 'ionic-angular';
import { File } from 'ionic-native';

declare var firebase: any;
declare var cordova: any;

@Injectable()
export class FireBaseData {

file: any;
recordstorage: any;

constructor() {
var rec = firebase.storage();
var recref = rec.ref();
this.recordstorage = recref.child("record");
}

public uploadrecording(blob: any) {

var uploadTask = this.recordstorage.child('copoutrecording.mp3').put(blob);

// Listen for state changes, errors, and completion of the upload.
uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED, // or 'state_changed'
  function (snapshot) {

    // Get task progress, including the number of bytes uploaded and the total number of bytes to be uploaded
    var progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
    console.log('Upload is ' + progress + '% done' + ": " + snapshot.bytesTransferred + " / " + snapshot.totalBytes);

    switch (snapshot.state) {
      case firebase.storage.TaskState.PAUSED: // or 'paused'
        console.log('Upload is paused');
        break;
      case firebase.storage.TaskState.RUNNING: // or 'running'
        console.log('Upload is running');
        //     alert("media uploading to firebase");
        break;
    }
  }, function (error) {
    switch (error.code) {
      case 'storage/unauthorized':
      // User doesn't have permission to access the object
        console.log(JSON.stringify(error));
        break;

      case 'storage/canceled':
        console.log(JSON.stringify(error));
        //  alert("cancelled: " + error.serverResponse);
        // User canceled the upload
        break;


      case 'storage/unknown':
        console.log(JSON.stringify(error));
        //    alert("error: " + error.message);
        //      alert("error: " + JSON.stringify(error));
        // Unknown error occurred, inspect error.serverResponse
        break;
    }
  }, function () {

    // Upload completed successfully, now we can get the download URL
    var downloadURL = uploadTask.snapshot.downloadURL;
    alert("made it to firebase" + downloadURL);
  });
}

}
</code></pre>