Consistent display of pre-existent filenames and user uploaded filenames
This commit is contained in:
parent
6ce5721cd2
commit
3e80bab1f6
@ -77,7 +77,8 @@ export default class ImageControl extends React.Component {
|
||||
if (this.state.currentImage instanceof File) {
|
||||
return this.state.currentImage.name;
|
||||
} else if (typeof this.state.currentImage === 'string') {
|
||||
return this.state.currentImage;
|
||||
const fileName = this.state.currentImage;
|
||||
return fileName.substring(fileName.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user