diff --git a/products/ASC.Files/Client/src/Files.jsx b/products/ASC.Files/Client/src/Files.jsx index 12d15a6095..672f31356b 100644 --- a/products/ASC.Files/Client/src/Files.jsx +++ b/products/ASC.Files/Client/src/Files.jsx @@ -6,7 +6,11 @@ import config from "../package.json"; import PrivateRoute from "@appserver/common/components/PrivateRoute"; import AppLoader from "@appserver/common/components/AppLoader"; import toastr from "studio/toastr"; -import { combineUrl, updateTempContent } from "@appserver/common/utils"; +import { + combineUrl, + updateTempContent, + loadScript, +} from "@appserver/common/utils"; import stores from "./store/index"; import i18n from "./i18n"; import { I18nextProvider, withTranslation } from "react-i18next"; @@ -62,6 +66,8 @@ class FilesContent extends React.Component { } componentDidMount() { + loadScript("/static/scripts/tiff.min.js", "img-tiff-script"); + this.props .loadFilesInfo() .catch((err) => toastr.error(err)) @@ -71,6 +77,11 @@ class FilesContent extends React.Component { }); } + componentWillUnmount() { + const script = document.getElementById("img-tiff-script"); + document.body.removeChild(script); + } + componentDidUpdate(prevProps) { const { isAuthenticated, diff --git a/products/ASC.Files/Client/webpack.config.js b/products/ASC.Files/Client/webpack.config.js index 0feabefd75..ea18b7f385 100644 --- a/products/ASC.Files/Client/webpack.config.js +++ b/products/ASC.Files/Client/webpack.config.js @@ -58,7 +58,6 @@ var config = { extensions: [".jsx", ".js", ".json"], fallback: { crypto: false, - path: require.resolve("path-browserify"), }, },