Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Latest
function requiresFormDataUpload
import { requiresFormDataUpload } from "https://deno.land/x/grammy@v1.32.0/core/payload.ts";

Determines for a given payload if it may be sent as JSON, or if it has to be uploaded via multipart/form-data. Returns true in the latter case and false in the former.

Parameters

payload: unknown

The payload to analyze

Returns

boolean