Skip to content

Add FormData and multipart/form-data support #2

@zoedsoupe

Description

@zoedsoupe

Problem

JS client supports FormData for file uploads. Elixir only supports Map (JSON), String, and Binary.

Proposed Solution

multipart = [
  {:file, binary, filename: "doc.pdf", content_type: "application/pdf"},
  {:field, "name", "document"}
]
Supabase.Functions.invoke(client, "upload", body: {:multipart, multipart})

Benefits

  • File upload support
  • Feature parity with JS client
  • Better Phoenix/Plug integration

JS Reference: functions-js/src/FunctionsClient.ts:142

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions