The file field is used to manage and associate various file formats other than images, such as PDF, CSV, ZIP, and Excel.
It is suitable for use cases like distributing white papers and sharing product specifications.

Please refer to the following documentation for uploading using the API and CSV.
Settings Item | Description |
|---|---|
Required Field | When set to ON, input will be required during submission. |
Description Text | This is the description text displayed on the submission screen. |
Please refer to the documentation below for details.
The file field is returned in object format, so you create a link by referencing the url property.
Below is an implementation example that displays a link to a PDF document using Next.js.
export default async function Page({ params }) {
const { slug } = await params;
// Fetch data using the microCMS JavaScript SDK (https://github.com/microcmsio/microcms-js-sdk)
const data = await client.getListDetail({
endpoint: "blog",
contentId: slug,
});
return (
<main>
{/* file is the field ID. Replace it with the actual field ID */}
<a href={data.file.url} target="_blank" rel="noopener noreferrer">
Download the document
</a>
</main>
);
}