FluxyAPIFluxyAPI
BlocksMedia & Design

Host Media

Upload raw media or Base64 strings to temporary storage and get a public URL.

The Host Media block allows you to transform raw file data—such as a Base64 string from a QR code or an image manipulation block—into a publicly accessible or secure URL. This is essential for sharing dynamically generated content in emails, websites, or messaging apps.

Core Concept

Think of this block as a temporary digital bulletin board. You pin a file to the board, and the block gives you the address (URL) where it can be seen. After a set amount of time, the file is automatically "unpinned" and permanently deleted.

Configuration

FieldRequiredDescription
File Data / Base64 stringThe raw content of the file. This is usually a variable containing a Base64 string from a previous block.
File NameThe name of the file including its extension (e.g., invoice.pdf or profile-pic.png).
File Retention (Delete After)How long the file remains on the server before being permanently deleted. Choices: 15 Minutes, 1 Hour, 24 Hours, 7 Days, 30 Days, 90 Days.
Private URL (Signed)If enabled, the link requires a cryptographic signature to access. This makes the file private.
Link Validity Duration(Visible if Private URL is enabled) How long the specific generated link remains active.
Output VariableThe variable name where the result object will be stored.
Retention vs. Link Validity

File Retention is how long the file physically exists on the server.
Link Validity is how long a specific signed link works.
Once a file is deleted, no link will work. If a signed link expires, you can generate a new one using the Sign Media URL block as long as the file hasn't reached its retention limit.

Supported File Types

  • Images: png, jpg, jpeg, gif, webp, svg, bmp, ico, tiff, tif, avif, heic, heif, jfif, pjpeg, pjp
  • Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, rtf
  • Text & Code: json, txt, html, htm, css, js, xml, csv, md, yaml, yml
  • Audio: mp3, wav, ogg, flac, aac, m4a, wma, opus
  • Video: mp4, webm, avi, mov, mkv, flv, wmv, 3gp, m4v
  • Archives: zip, tar, gz, rar, 7z, bz2
  • Fonts: woff, woff2, ttf, otf, eot

Error Handling

  • FILE_DATA_MISSING — Triggered when no file data is provided.
  • FILE_NAME_MISSING — Triggered when no filename is specified.
  • INVALID_FILE_DATA — Triggered if the provided data is not a valid Base64 string or buffer.
  • FILE_TOO_LARGE — Triggered if the file exceeds your project's maximum allowed file size.
  • STORAGE_LIMIT_REACHED — Triggered when your project's total storage quota is full.
  • UPLOAD_FAILED — Triggered if the upload process fails due to a server error.
  • SIGN_FAILED — Triggered if a private/signed URL could not be generated.

Example

  1. File Data: {qr_code_base64} (output from a QR Code block)
  2. File Name: qr-code.png
  3. File Retention: 24 Hours
  4. Output Variable: hosted_file

Result: After execution, {hosted_file.url} will contain a URL like https://your-domain.com/media/xyz/qr-code.png. You can now use this URL in an image tag or send it in an automated email.

On this page