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.30.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