App crashes when trying to upload in firebase : App crashes when trying to upload in firebase. In the XML i have a upload button that is used to invoke camera. On clicking it doesn't get uploaded on to the firebase.

This is my code 



    private Button mUploadBtn;
    private ImageView mImageView;

    private static final int CAMERA_REQUEST_CODE = 1;

    private StorageReference mStorage;

    Uri photoURI;

    private ProgressDialog mProgressDialog;

    private static final int GALLERY_INTENT = 2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mStorage = FirebaseStorage.getInstance().getReference();

        mUploadBtn = (Button) findViewById(R.id.upload);

        mImageView = (ImageView) findViewById(R.id.imageView);

        mProgressDialog = new ProgressDialog(this);

        mUploadBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

                startActivityForResult(intent, CAMERA_REQUEST_CODE);
            }
        });

    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {

        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == CAMERA_REQUEST_CODE && resultCode == RESULT_OK) {

            mProgressDialog.setMessage("Uplaoding");
            mProgressDialog.show();

            Uri uri = data.getData();



            StorageReference filepath = mStorage.child("Photos").child("file");
            filepath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
                @Override
                public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                    mProgressDialog.dismiss();
                    Toast.makeText(MainActivity.this,"Done",Toast.LENGTH_LONG).show();
                }
            });




        }
    }
}[This is the error i am getting and it is pointing to 

filepath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {

][1]


  [1]: https://i.stack.imgur.com/WG36s.png