Very Popular
Latest
function requiresFormDataUpload
import { requiresFormDataUpload } from "https://dotland.deno.dev/x/grammy@v1.31.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