---
title: "attach to document · RUAL Documentation"
description: "RUAL files block."
canonical: https://docs.rual.nl/block-types/files/function_attach_file_to_document
language: en
---

# attach to document

This block is part of the [`files`](https://docs.rual.nl/block-types/files) group and was last modified in core [`v12.0.4`](https://docs.rual.nl/core-versions/120004).

### Storage Selection Required

This block relies on a storage to perform its storage releated actions. You must manually select the storage you want to use in your flow using the storage selector modal. To access the modal, click the white button on the block.

### Field Selection Required

This block relies on a field that you select to perform its data actions. You must manually select the field you want to use in your flow using the field selector modal. To access the modal, click the white button on the block.

- flow `flow`

- file required `file` the file to add into the selected field

- guid required `value` _meta.guid of the document to add this file to.

- storage required `storage` storage this document is located in

- Filepath `v10.4.28` `value` Defines an alternate filepath to be used. By default the file will be saved under /storage/code/file or /storage/guid/file. Should not include the filename

- flow `flow`

- success `condition` state of the execution, false may indicate this document was not found

- error `v11.5.15` `value` shows some information about the error if success is false

### Version history

Introduced in [`v12.0.4`](https://docs.rual.nl/core-versions/120004).

Deprecated since [`v12.0.4`](https://docs.rual.nl/core-versions/120004).
