# `PhoenixKit.Modules.Storage.ProcessFileJob`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.32.1/lib/modules/storage/workers/process_file_job.ex#L1)

Oban job for background processing of uploaded files.

This job handles:
- Generating file variants (thumbnails, resizes)
- Extracting metadata (dimensions, duration)
- Updating file status

Unique per `file_uuid` while still pending or running, because the job
regenerates **every** variant of a file rather than one: a gallery page whose
thumbnails do not exist yet asks `FileController` for a dozen variants at
once, and without this each request would enqueue another full run of the
same work. The key is the file, not the variant, for the same reason — the
args carry no variant at all.

`:completed` is deliberately NOT a unique state (same reasoning as
`AnnotationThumbnailJob`): once a run finishes, a later request — a new
dimension added to the kit, a replaced original, a run that failed to write
an instance — must be able to enqueue again instead of being silently
swallowed until the period lapses.

# `perform`

Process a file and generate variants.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
