Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary data support #69

Closed
FranckFreiburger opened this issue May 15, 2021 · 0 comments
Closed

Add binary data support #69

FranckFreiburger opened this issue May 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@FranckFreiburger
Copy link
Owner

FranckFreiburger commented May 15, 2021

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 }

@FranckFreiburger FranckFreiburger added the enhancement New feature or request label May 15, 2021
FranckFreiburger added a commit that referenced this issue May 15, 2021
see the issue #69 for details

BREAKING CHANGE: *getFile()* will continue to support a simple string as return value but the object form is now : `{ type, getContentData }` instead of `{ type, content }`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant