Attachment

Use Attachment fields to upload files to your records. You can upload any file type, and NocoDB links the file to the record. You can also upload many files to one Attachment field in a record.

Ask NocoAI

Copy a prompt, paste it into NocoAI in any base, and replace the words in [brackets] with your own.

  • Add an [Attachments] field to this table
  • Import the file attached to this record into a new table
  • Show me the records that have no files in [Attachments]

Create an Attachment field

  1. Click the + icon to the right of Fields header.
  2. In the dropdown modal, enter the field name (Optional).
  3. In the dropdown, select the field type Attachment.
  4. Click Save Field.

image

Max size for an attachment file is currently limited to 5 MB

Cell display

An Attachment cell shows one of these:

  • A preview that you can click, if the file is an image in a known format.
  • A file-type icon, for all other files.
  • A warning tile, if the file was added by URL through the API and NocoDB could not download it. To see the reason, expand the cell and hover the tile. Delete the file and add it again to replace it.

An Attachment field with image previews, PDF icons and a warning tile for a file that NocoDB could not download

Upload files

To upload files to an Attachment field, use one of these methods:

  • Click the + icon in the cell. Choose the file to upload, then click Upload.
  • Drag the file and drop it on the cell.
  • Click the expand icon <>. Choose the file to upload, or drag and drop the file. Then click Upload.
On NocoDB Cloud, the plan of the workspace sets how many files one cell holds: 10 on the Free plan and 1000 on the paid plans. The Max Number of Attachments option of the field cannot raise that number.

Expand modal

The expand modal of an Attachment field shows the list of files in the field. You can also upload files from the expand modal. To open the expand modal, click the expand icon <> in the cell.

image

The expand modal has these actions:

Attach file(s)

  1. Click Attach file(s) <1>.
  2. Choose the file(s) to upload.

Delete file

  • To delete the file, click the x icon <2> at the top left of the image card.

Download file

  • To download the file, click Download <5>.

Bulk Download file(s)

  1. To select the files, click the checkbox <3> at the top left of each image card.
  2. To download the selected files, click Bulk Download <4>.

Rename file

  1. Click Rename <5>.
  2. In the input field, enter the new name.
  3. To save the new name, click Rename.

Rename file only renames the file in NocoDB display (expand record & tool tip on hover). It does not rename the file in the storage.

Environment variables

In the self-hosted version, you can set these environment variables to change the behavior of the Attachment field:

VariableWhat it setsDefault
NC_ATTACHMENT_FIELD_SIZEThe maximum size of attachment files, in bytes.20971520 (20 MiB)
NC_MAX_ATTACHMENTS_ALLOWEDThe maximum number of attachments in one cell.10
NC_SECURE_ATTACHMENTSLets users access attachments only through pre-signed URLs.false
NC_ATTACHMENT_EXPIRE_SECONDSThe expiry time of pre-signed URLs.7200 (2 hours)

For all supported environment variables, refer to Environment variables.

Last updated on

Latest product updates?See Changelog
Stay in the loop? Follow us onLinkedInLinkedInYouTubeYouTubeXX