Open wijayantoap opened 2 years ago
I don't get the same image everytime, this may be caused on your side due some sort of cache (FastImage).
That said, it seems like some things are a bit broken inside the lib now, and there's need of some small fixes. I think the change in URL is happening because with the new compile SDK the underyling CanHub library produces Content URI's that need to be translated to File URI's.
Proposed fixes:
file://
by prepending it if it is missing after getting the file URI from the underlying library. Could be done in the JavaScript part of the module or the android part.getUriFilePath
to true in ImageCropViewManager#L35. This will help with cache bustingI might be able to take a swing at a PR if I find the time for it.
@hhunaid If I make a PR to address these issues will it be merged? I see two open PR's at the moment.
It happens recently after I increase the compiled SDK to 30 because of this issue. I am not sure whether it is the cause or not. After that, whenever I tried to crop the image, the response that I got was like this
{"height": 332, "uri": "/data/user/0/id.oftheapp/cache/temp_file_.jpg", "width": 592}
. If I am not mistaken, previously the response uri that I got started withfile/:....
. And now, whenever I crop another picture and access that picture from theonImageCrop
, I always got the first image that I cropped.