diff --git a/assets/js/src/core/app/api/pimcore/route.ts b/assets/js/src/core/app/api/pimcore/route.ts index 8c4bc59eb..b81472ee5 100644 --- a/assets/js/src/core/app/api/pimcore/route.ts +++ b/assets/js/src/core/app/api/pimcore/route.ts @@ -11,14 +11,6 @@ * @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL */ -export function getDomain (): string { - return 'http://localhost' -} - export function getPrefix (): string { return '/pimcore-studio/api' } - -export function getDomainWithPrefix (): string { - return `${getDomain()}${getPrefix()}` -} diff --git a/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-container.tsx b/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-container.tsx index be219559e..db253e159 100644 --- a/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-container.tsx +++ b/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-container.tsx @@ -20,7 +20,7 @@ import { } from '@Pimcore/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-view' import { replaceFileEnding, saveFileLocal } from '@Pimcore/utils/files' import { buildQueryString } from '@Pimcore/utils/query-string' -import { getDomainWithPrefix } from '@Pimcore/app/api/pimcore/route' +import { getPrefix } from '@Pimcore/app/api/pimcore/route' const DetailContainer = (): React.JSX.Element => { const assetContext = useContext(AssetContext) @@ -78,7 +78,7 @@ const DetailContainer = (): React.JSX.Element => { const queryString = buildQueryString(keyValues, ['', '-1']) - fetch(`http://localhost/pimcore-studio/api/assets/${id}/image/download/custom?${queryString}`) + fetch(`${getPrefix()}/assets/${id}/image/download/custom?${queryString}`) .then(async (response) => await response.blob()) .then((imageBlob) => { const imageURL = URL.createObjectURL(imageBlob) @@ -91,10 +91,10 @@ const DetailContainer = (): React.JSX.Element => { function downloadImageByFormat (id: number, format: string): void { if (format === 'original') { - prepareDownload(`${getDomainWithPrefix()}/assets/${id}/download`, format) + prepareDownload(`${getPrefix()}/assets/${id}/download`, format) return } - prepareDownload(`${getDomainWithPrefix()}/assets/${id}/image/download/format/${format}`, format) + prepareDownload(`${getPrefix()}/assets/${id}/image/download/format/${format}`, format) } function prepareDownload (url: string, format: string): void { diff --git a/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-view.tsx b/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-view.tsx index bfec5fb63..d80ccc59c 100644 --- a/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-view.tsx +++ b/assets/js/src/core/modules/asset/editor/types/image/tab-manager/tabs/preview/sidebar/tabs/details/details-view.tsx @@ -72,7 +72,7 @@ export const AssetEditorSidebarDetailsView = ({ const CUSTOM_DOWNLOAD_OPTIONS = [ { key: 1, - title: Custom Download, + title: {t('image-sidebar.tab.details.custom-download')}, children: (