fix: upload remote image preview (#9952)

This commit is contained in:
zxhlyh 2024-11-01 15:45:27 +08:00 • committed by GitHub
commit 78b74cce8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 33 deletions

View file

@ -31,8 +31,8 @@ const FileItem = ({
onRemove,
onReUpload,
}: FileItemProps) => {
const { id, name, type, progress, url } = file
const ext = getFileExtension(name, type)
const { id, name, type, progress, url, isRemote } = file
const ext = getFileExtension(name, type, isRemote)
const uploadError = progress === -1
return (
@ -75,7 +75,9 @@ const FileItem = ({
</>
)
}
{formatFileSize(file.size || 0)}
{
!!file.size && formatFileSize(file.size)
}
</div>
{
showDownloadAction && (