无法下载文件:我正在使用锚标记来下载文件,但本地主机附加到它并且 link 混乱了
Unable to download files : I am using anchor tag to download file but the localhost is appended to it and the link is jumbled up
<a target="_blank" href=`{{url}}` download>Download {{body}}</a>
这是我正在使用的代码。
href link 应该是 https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd
错误的 href link 是 http://localhost:3000/%60https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd%60
谁能解释为什么会这样?
要将用户重定向到绝对路径,HTML 锚标记应包含以下属性。
<a href="https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd" target="_blank" download>Download {{body}}</a>
`href="https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/{{changingPart}}"`
我使用上面的 URL 而不是 {{url}} 它工作并且没有附加本地主机部分。
<a target="_blank" href=`{{url}}` download>Download {{body}}</a>
这是我正在使用的代码。
href link 应该是 https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd
错误的 href link 是 http://localhost:3000/%60https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd%60
谁能解释为什么会这样?
要将用户重定向到绝对路径,HTML 锚标记应包含以下属性。
<a href="https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/dsgakdgaksgd" target="_blank" download>Download {{body}}</a>
`href="https://matrix-client.matrix.org/_matrix/media/r00/download/matrix.org/{{changingPart}}"`
我使用上面的 URL 而不是 {{url}} 它工作并且没有附加本地主机部分。