mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-02 01:38:00 +00:00
fix(@desktop/chat): fix upload of image with special characters
fixes #3034
This commit is contained in:
parent
0bc7a6038b
commit
5488abcbde
@ -1,7 +1,8 @@
|
||||
import strutils
|
||||
import uri as uri
|
||||
|
||||
proc formatImagePath*(imagePath: string): string =
|
||||
result = replace(imagePath, "file://", "")
|
||||
result = uri.decodeUrl(replace(imagePath, "file://", ""))
|
||||
if defined(windows):
|
||||
# Windows doesn't work with paths starting with a slash
|
||||
result.removePrefix('/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user