first excuse me for my bad english.My retrofit work when I select picture manually.but when i upload an image by file path, my app force closed
my file location = storage/emulatrd/0/myImage.jpg
File file = new File(Environment.getExternalStorageDirectory().toString() + "/bb.jpg"); Uri uri = Uri.fromFile(file); // when i use this uri my app crashed Uri selectedImage = data.getData(); // this uri good worked uploadFile(uri , "My Image");
https://stackoverflow.com/questions/66805259/how-get-image-uri-from-file-path March 26, 2021 at 02:08AM
没有评论:
发表评论