Yalantis是否可以将Firebase存储用作uCrop库中的destinationUri?

时间:2019-01-31 16:39:20

标签: android android-studio uri ucrop

在uCrop库中,我想将裁剪后的图像存储在Firebase存储中。那么我可以使用userStorage.getPath()作为destinationUri吗?

final StorageReference userStorage = FirebaseStorage.getInstance().getReference().child("Users").child("test");
File tempFile = new File (String.valueOf(getIntent().getParcelableExtra("ImageUri")));
File tempCropped = new File(userStorage.getPath());

Uri sourceUri = Uri.fromFile(tempFile);
Uri destinationUri = Uri.fromFile(tempCropped);


UCrop.of(sourceUri,destinationUri)
        .withAspectRatio(1,1)
        .withMaxResultSize(40,40)
        .start(this);

如果我想将图像存储在Firebase Storage中,我想知道获取destinationUri的方法。非常感谢

0 个答案:

没有答案