Skip to main content

File Size Within

File Size Within

Determines whether the current file size is within a specified difference from the original file size.
This can be used to validate if a file has changed too much (or not enough) after processing, encoding, compression, etc.

Overview

This flow element compares the size of the current file (or folder) against the original size, and decides whether the difference falls within the allowed range.

You can define the allowed range as an absolute value in megabytes (MB) or as a percentage (%) of the original size.

Value

Choose how you want to measure the allowed difference:

  • Megabytes (MB):
    Specify the maximum size difference in MB. The result passes if the size difference (larger or smaller) is less than or equal to this value.
  • Percentage (%):
    Use a percentage of the original size to allow flexible tolerance for files of varying sizes.
    For example, a 10% tolerance on a 1GB file means up to 100MB of difference is allowed.

The setting applies to both files and folders.

Outputs

  • Output 1 (Within Range):
    The size difference is within the defined threshold.

  • Output 2 (Outside Range):
    The size difference exceeds the allowed threshold.

Example Use Cases

  • Ensuring encoding has not drastically changed the file size.
  • Validating that compression or filters didn’t result in unexpectedly large or small files.
  • Detecting file corruption or unexpected content changes.

Notes

  • The original size is determined by the system at the beginning of the flow and stored in a variable.
  • This flow element works for both individual files and folders.
  • If the original size is missing or invalid, the flow element will log an error and fail.