Defjs
Core

struct.file

Struct that accepts a File.

@defjs/core · Function

Signature

function file(): Struct<File, File>;
  • Accepts a File only; a plain Blob fails with invalid_type.

  • Use it for a field of struct.formData(), or for a raw file body.

  • As an output or error struct it makes the response body be read as a blob.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao