MCPcopy Create free account
hub / github.com/apitable/apitable / integrateCdnHost

Function integrateCdnHost

packages/core/src/utils/file.ts:205–217  ·  view source on GitHub ↗
(
  pathName: string,
)

Source from the content-addressed store, hash-verified

203}
204
205export const integrateCdnHost = (
206 pathName: string,
207): string => {
208 if (!pathName) {
209 return pathName;
210 }
211 // TODO: delete this. Compatible with old version data
212 if (pathName.startsWith('http')) {
213 return pathName;
214 }
215 const host: string = getHostOfAttachment('QNY1', pathName);
216 return urlcat(host, pathName);
217};
218
219function startsWithIgnoreSlashPre(str: string, prefix: string): boolean {
220 if (str.startsWith(prefix)) {

Callers 15

getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getViewIntroduceMethod · 0.90
getEmojiSourceFunction · 0.90
MyAppMainFunction · 0.90
renderMethod · 0.90
WidgetPreviewFunction · 0.90
renderUserFunction · 0.90

Calls 1

getHostOfAttachmentFunction · 0.85

Tested by

no test coverage detected