Skip to content

Add binary data support #69

@FranckFreiburger

Description

@FranckFreiburger

Is your feature request related to a problem? Please describe.
At the moment it is not possible to require binary data (eg. import logo from "../images/logo.png";)

Describe the solution you'd like
The solution is to mimic how fetch() handle this :

  1. fetch the resource
  2. use the right API to get the data as text or as binary (see https://developer.mozilla.org/en-US/docs/Web/API/Body)

Additional context
see discussion #60

** Note **
This implies a breaking changes for the API options.getFile() and type File

getFile() will continue to support a simple string as return value but the object form will be :
{ type, getContentData } instead of { type, content }

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