coil icon indicating copy to clipboard operation
coil copied to clipboard

File name contain '#' load error.

Open XuQK opened this issue 2 years ago • 0 comments

Describe the bug If parse a local path contain '#' like this: /sdcard/fi#le.jpeg to this method:

ImageView.load(
    data: Any?,
    imageLoader: ImageLoader = context.imageLoader,
    builder: ImageRequest.Builder.() -> Unit = {}
)

the path will be cut to /sdcard/fi, lost path after '#'. This happend after ComponentRegistry.map(data: Any, options: Options): Any be called, after being processed by FileUriMapper.

I can call Uri.encode() to solve it every time use ImageView.load(), but it looks stupid. can you make it smater? Thanks.

To Reproduce Parse any local path contain '#'.

Version coil-2.1.0

XuQK avatar Jun 30 '22 06:06 XuQK