Skip to main content

Accessing File Metadata

File metadata such as the size, content type, and checksum of a file can be accessed from queries, mutations, actions, and HTTP actions via the storage.getMetadata() function:

import { query } from "./_generated/server";

export const getMetadata = query(async ({ storage }, { storageId }) => {
return await storage.getMetadata(storageId);

You can check the metadata manually on your dashboard.