update url
This commit is contained in:
parent
9a9a94e5d4
commit
c6a9fc28a3
|
|
@ -103,8 +103,12 @@ const Document = () => {
|
|||
if (['doc'].includes(extension!)) {
|
||||
return (
|
||||
<a
|
||||
href={`${import.meta.env.VITE_BACKEND_URL}${uri}`}
|
||||
download="Document Download"
|
||||
href={`${import.meta.env.VITE_BACKEND_URL}${
|
||||
import.meta.env.VITE_BACKEND_URL?.includes('localhost')
|
||||
? ''
|
||||
: 'image/'
|
||||
}${uri}`}
|
||||
download={row.title}
|
||||
target="_self"
|
||||
>
|
||||
<IconFileTypeDoc style={{ color: '#1e62c1' }} />
|
||||
|
|
@ -115,8 +119,12 @@ const Document = () => {
|
|||
if (['xls', 'xlsx'].includes(extension!)) {
|
||||
return (
|
||||
<a
|
||||
href={`${import.meta.env.VITE_BACKEND_URL}${uri}`}
|
||||
download="Document Download"
|
||||
href={`${import.meta.env.VITE_BACKEND_URL}${
|
||||
import.meta.env.VITE_BACKEND_URL?.includes('localhost')
|
||||
? ''
|
||||
: 'image/'
|
||||
}${uri}`}
|
||||
download={row.title}
|
||||
target="_self"
|
||||
>
|
||||
<IconFileTypeXls style={{ color: '#0e864b' }} />
|
||||
|
|
|
|||
Loading…
Reference in New Issue