PromucFlow_constructor/app/client/src/constants/ImagesURL.ts
Sangeeth Sivan 82280cfde9
feat: util to serve images locally or via remote url (#22080)
## Description

- On air-gapped instances we can't fetch appsmith assets from S3, that
will result in broken which is not desirable.
- So this adds a script and util function which searches the client and
server codebase for the assets url and downloads the image and puts it
in the `public` folder so that the browser can access those even in an
airgapped instance since the assets are being served locally.

> Way to serve assets locally.

Fixes #22004 
> if no issue exists, please create an issue and ask the maintainers
about this first

Media
https://vdqm24wed6.vmaker.com/record/IquS90WbWgS1I0bz - blocked certain
api routes from getting called on airgap
2023-04-10 12:32:31 +05:30

8 lines
327 B
TypeScript

import { ASSETS_CDN_URL } from "./ThirdPartyConstants";
import { getAssetUrl } from "@appsmith/utils/airgapHelpers";
export const getInfoThumbnail = () =>
getAssetUrl(`${ASSETS_CDN_URL}/crud/crud_info_thumbnail.png`);
export const getInfoImage = (): string =>
getAssetUrl(`${ASSETS_CDN_URL}/crud/working-flow-chart.png`);