I am using retrofit Multipart request to upload an image and it is uplaoding successfully to the server, in another screen I want to implement the functionality to change or delete that image and when I fetch the image from the server I only got the name of the image and a Base URL by using which I can display the picture in ImageView/RecyclerView and the problem is I am not able to upload exact the same image again as I have only the name of the image, is there any way in android from where I can get the image as a File by just providing the name of the image like (1000007983.jpg).
I have tried creating the file from the URL which the server is returing but getting an error of file not found.
if you can show image on ImageView then you can get it as Bitmap and then you can convert it back to File. This is the method I'm using to convert image to Bitmap and then Bitmap to File
After getting imageFile from that method I'm uploading again to server like this