Go to Latest
function requiresFormDataUpload
import { requiresFormDataUpload } from "https://deno.land/x/grammy@v1.11.1/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