Skip to content

[FEATURE] Send Files or Bytes through ports #133

@decioferreira

Description

@decioferreira

Is your feature request related to a problem? Please describe.

From https://elmlang.slack.com/archives/C0CJ3SBBM/p1762178135113389

I am trying to load and play a local video file in the browser. Since my files can be large (gigas of them bytes), I would rather not use File.toUrl and rather use the URL.createObjectURL api of the browser. However, I can't send File objects through ports. Any better way to do that?
Edit: Bytes is also not transferable across ports.

Additional context

This feature seems to exist in lamdera. Related commits/issues:

There is also an issue in elm about this: elm#2313

Update

#137 implements sending Bytes through flags and ports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions