function dumpFileVersion
dumpFileVersion(dump: { fileSize?: number; createdAt?: Date; updatedAt?: Date; }): string

Returns a file dump's version, which the file and thumbnail URLs carry as ?v=: the frontend's dumpFileUrl and dumpThumbnailUrl, and the digest's thumbnails. It changes whenever the file may have, so the file and thumbnail routes cache a URL naming the current one for good and revalidate any other. Without its dates, a dump gets a version no route serves as current.

Parameters

dump: { fileSize?: number; createdAt?: Date; updatedAt?: Date; }

Return Type

string

Usage

import { dumpFileVersion } from "shared/dump.ts";