mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 10:26:17 +00:00
fix custom org logo bug when enable AVATAR_FILE_STORAGE (#5703)
This commit is contained in:
@@ -17,7 +17,7 @@ class Logo extends React.Component {
|
||||
return (
|
||||
<div className="top-logo">
|
||||
<a href={siteRoot} id="logo">
|
||||
<img src={mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" />
|
||||
<img src={logoPath.indexOf('image-view') != -1 ? logoPath : mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" />
|
||||
</a>
|
||||
{this.props.showCloseSidePanelIcon &&
|
||||
<a
|
||||
|
@@ -20,8 +20,8 @@ class OrgWebSettings extends Component {
|
||||
loading: true,
|
||||
errorMsg: '',
|
||||
config_dict: null,
|
||||
logoPath: mediaUrl + logoPath,
|
||||
file_ext_white_list: '',
|
||||
logoPath: logoPath,
|
||||
file_ext_white_list: '',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class OrgWebSettings extends Component {
|
||||
updateLogo = (file) => {
|
||||
seafileAPI.orgAdminUpdateLogo(orgID, file).then((res) => {
|
||||
this.setState({
|
||||
logoPath: mediaUrl + res.data.logo_path
|
||||
logoPath: res.data.logo_path
|
||||
});
|
||||
toaster.success(gettext('Success'));
|
||||
}).catch((error) => {
|
||||
@@ -77,7 +77,9 @@ class OrgWebSettings extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loading, errorMsg, config_dict, logoPath, file_ext_white_list } = this.state;
|
||||
const { loading, errorMsg, config_dict, file_ext_white_list } = this.state;
|
||||
let logoPath = this.state.logoPath;
|
||||
logoPath = logoPath.indexOf('image-view') != -1 ? logoPath : mediaUrl + logoPath;
|
||||
return (
|
||||
<Fragment>
|
||||
<MainPanelTopbar {...this.props} />
|
||||
|
Reference in New Issue
Block a user