do not encode raw url to clipboard, fix #61

This commit is contained in:
spencerwooo 2021-08-23 14:34:38 +01:00
parent fa4c34d76f
commit 778666b7b4
No known key found for this signature in database
GPG key ID: 24CD550268849CA0

View file

@ -205,7 +205,7 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) =
render: <FontAwesomeIcon icon="copy" />,
onClick: i => {
navigator.clipboard.writeText(
i.alt ? `${getBaseUrl()}/api?path=${encodeURIComponent(path + '/' + i.alt)}&raw=true` : ''
i.alt ? `${getBaseUrl()}/api?path=${path + '/' + i.alt}&raw=true` : ''
)
toast.success('Copied image permanent link to clipboard.')
},