---
title: "base64 to file · RUAL Documentation"
description: "Accepts a base64 string and returns a file. The file is written to its own directory under /temp/ (/temp/{id}/{filename}) so concurrent conversions neve…"
canonical: https://docs.rual.nl/block-types/files/function_base64_to_file
language: en
---

# base64 to file

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

Accepts a base64 string and returns a file. The file is written to its own directory under `/temp/` (`/temp/{id}/{filename}`) so concurrent conversions never share a name.

- flow `flow`

- base64 required `value` The base64 to be transformed to a file

- filename `v15.0.0` `value` Optional name for the file. Each conversion gets its own directory under `/temp/`, so the name only has to be unique within this call. Defaults to a generated id with the extension of the detected mime type.

- flow `flow`

- success `condition`

- error `value`

- file `file`

A typical wiring for [base64 to file](https://docs.rual.nl/block-types/files/function_base64_to_file): [branch](https://docs.rual.nl/block-types/flow/branch) feeds the `flow` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `value` pin; the `flow` out pin feeds [return](https://docs.rual.nl/block-types/function%20execution/function_return).

![Studio canvas example for the base64 to file block: typical wiring for base64 to file.](https://docs.rual.nl/canvas-examples/function_base64_to_file.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [return](https://docs.rual.nl/block-types/function%20execution/function_return): this block feeds into it. Returns the added custom pins as data-pins on the function execute.

- [branch](https://docs.rual.nl/block-types/flow/branch): feeds into this block.

- [get fields](https://docs.rual.nl/block-types/object/object_field_getter_multiple): feeds into this block. Gets the selected fields from the given object.

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
