Skip to content
Snippets Groups Projects
Commit bf289051 authored by Sebastian Karlsson's avatar Sebastian Karlsson
Browse files

Resolve "Fix image uploading bug"

parent a8eba371
No related branches found
No related tags found
1 merge request!163Resolve "Fix image uploading bug"
Pipeline #46582 passed with warnings
......@@ -65,6 +65,8 @@ const Images = ({ activeViewTypeId, activeSlide, competitionId }: ImagesProps) =
createImageComponent(response)
}
}
// Resets the input, so that the same file can be uploaded again.
e.target.value = ''
}
const handleCloseimageClick = async (image: ImageComponent) => {
......@@ -107,7 +109,13 @@ const Images = ({ activeViewTypeId, activeSlide, competitionId }: ImagesProps) =
<ListItem divider button>
<ImportedImage src={`http://localhost:5000/static/images/thumbnail_${image.media?.filename}`} />
<Center>
<ListItemText primary={image.media?.filename} />
<ListItemText
primary={
image.media?.filename.length > 25
? image.media?.filename.substr(0, 24) + '...'
: image.media?.filename
}
/>
</Center>
<CloseIcon onClick={() => handleCloseimageClick(image)} />
</ListItem>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment