QANode Logo

Base64 to File Node

The Base64 to File node receives Base64 content or a Data URI and creates a file inside QANode, returning a fileRef for the next nodes.


Overview

PropertyValue
Typefile-from-base64
CategoryFiles
Color🟤 Gold (#C89F65)
Inputin
Outputout

When to Use

Use this node when:

  • an API returns a file as Base64;
  • a custom integration produces a Data URI;
  • you need to transform Base64 into fileRef before sending it to another node;
  • you want to convert Base64 to a real file and then extract it.

Configuration

FieldTypeDescription
Base64stringBase64 content or Data URI
File namestringFinal file name

The user does not need to fill in the MIME type. QANode tries to infer it automatically from:

  • Data URI prefix, when present;
  • file signature;
  • file extension.

Example Data URI:

data:application/pdf;base64,JVBERi0xLjQK...

Example plain Base64:

JVBERi0xLjQK...

Outputs

OutputTypeDescription
fileReffileRefReference to the generated file
namestringFile name
mimeTypestringInferred MIME type
sizeBytesnumberFile size

Accessing Outputs

{{ steps["file-from-base64"].outputs.fileRef }}
{{ steps["file-from-base64"].outputs.name }}
{{ steps["file-from-base64"].outputs.mimeType }}
{{ steps["file-from-base64"].outputs.sizeBytes }}

Examples

API returns Base64 PDF

[HTTP Request] → returns body.documentBase64
[Base64 to File]
  Base64: {{ steps["http-request"].outputs.body.documentBase64 }}
  File name: contract.pdf

Then:

{{ steps["file-from-base64"].outputs.fileRef }}

Convert Data URI image

Base64: {{ steps["custom-js"].outputs.result.imageDataUri }}
File name: screenshot.png

Round Trip

This node is the opposite of File to Base64:

[File to Base64] → [Base64 to File]

or:

[Base64 to File] → [Extract File]

Tips

  • Prefer Data URI when the source already provides MIME type information.
  • If using plain Base64, provide a file name with extension to help inference.
  • To validate the content, chain it with Extract File.