title: Firebase Storage store profile image from Facebook
body: <p>I am trying to get a Facebook profile picture and store it in Firebase Storage.
  What I am doing is as follows;</p>
  
  <ol>
  <li><p>get url of the profile picture (looks fine).</p></li>
  <li><p>change to uri from url (I think it is also fine).</p></li>
  <li><p>upload the file to Firebase Storage but 'uploadFile' method.</p></li>
  </ol>
  
  <p>But I've got an error. This is my uploadFile.</p>
  
  <pre><code>private void uploadFile(Uri pUri) {
      storage = FirebaseStorage.getInstance();
      mStorageReference = storage.getReferenceFromUrl("gs://project-66993355093102411.appspot.com/");
      mStorageReferenceImages = mStorageReference.child("Images/profile.jpg");
      //showHorizontalProgressDialog("Uploading", "Please wait...");
      StorageReference uploadStorageReference = mStorageReference.child(pUri.getLastPathSegment());
      //final UploadTask uploadTask = uploadStorageReference.putFile(pUri);
      final UploadTask uploadTask = mStorageReferenceImages.putFile(pUri);
      Log.d(TAG, "FacebookProfile:pUri: " + pUri);
  
      uploadTask.addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
          @Override
          public void onSuccess(UploadTask.TaskSnapshot pTaskSnapshot) {
              Log.d(TAG, "uploadFileonSuccess:" + pTaskSnapshot);
              Uri downloadUrl = pTaskSnapshot.getDownloadUrl();
              //hideProgressDialog();
              if (downloadUrl != null) {
                  imageUploaded = true;
                  //btnDownload.setEnabled(true);
                  //Glide.with(context).load(downloadUrl).into(imageView);
              }
          }
      }).addOnFailureListener(new OnFailureListener() {
          @Override
          public void onFailure(@NonNull Exception pE) {
              Log.d(TAG, "uploadFileonFailure:" + pE);
          }
      }).addOnProgressListener(new OnProgressListener&lt;UploadTask.TaskSnapshot&gt;() {
          @Override
          public void onProgress(UploadTask.TaskSnapshot pTaskSnapshot) {
              Log.d(TAG, "uploadFileonProgress:" + pTaskSnapshot);
  
              //int progress = (int) (100 * (float) pTaskSnapshot.getBytesTransferred() / pTaskSnapshot.getTotalByteCount());
              //updateProgress(progress);
          }
      });
  }
  </code></pre>
  
  <p>This is an error I've got.</p>
  
  <blockquote>
    <p>07-21 02:31:42.441 25140-25140/com.mai.aso.masaya.teachu E/UploadTask: could not locate file for uploading:<a href="https://(link" rel="nofollow">https://(link</a> to profile picture)</p>
    
    <p>07-21 02:31:42.442 25140-25140/com.mai.aso.masaya.teachu E/StorageException: StorageException has occurred.
    An unknown error occurred, please check the HTTP result code and inner exception for server response.                                                      Code: -13000 HttpResult: 0</p>
    
    <p>07-21 02:31:42.443 25140-25140/com.mai.aso.masaya.teachu E/StorageException: No content provider: <a href="https://(link" rel="nofollow">https://(link</a> to profile picture)</p>
  </blockquote>
  
  <p>I am a new android developer, and don't know what is going wrong.
  I really hope you are willing to help me.
  Thank you </p>