Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

665 B
Raw Blame
import type { ZAssetType } from "../types/bookmarks";

export function getAssetUrl(assetId: string) {
  return `/api/assets/${assetId}`;
}

export function humanFriendlyNameForAssertType(type: ZAssetType) {
  const map: Record<ZAssetType, string> = {
    screenshot: "Screenshot",
    pdf: "PDF",
    assetScreenshot: "Asset Screenshot",
    fullPageArchive: "Full Page Archive",
    precrawledArchive: "Precrawled Archive",
    bannerImage: "Banner Image",
    video: "Video",
    bookmarkAsset: "Bookmark Asset",
    linkHtmlContent: "HTML Content",
    userUploaded: "User Uploaded File",
    avatar: "Avatar",
    unknown: "Unknown",
  };
  return map[type];
}