Fields

Upload Field

PayloadCMS upload field configuration for media collection relationships

Preview

import uploadField from "~/payload/fields/upload/config";

// Usage in PayloadCMS block/collection config
const mediaField = uploadField({
  name: "image",
  label: "Hero Image",
  required: false,
});

Props

The uploadField function accepts the following configuration options:

Prop

Type

Installation

npx shadcn@latest add @uifoundry/upload-field

If you encounter issues, check the registry setup guide for configuration help.

Registry Dependencies

This component uses the following registry components:

  • Field Types - TypeScript definitions for PayloadCMS fields

Dependencies

This component requires the following NPM packages:

  • React - JavaScript library for building user interfaces
  • Next.js - React framework for production