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

Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'. #27

Closed
crenardaaaic opened this issue Feb 12, 2021 · 6 comments

Comments

@crenardaaaic
Copy link

crenardaaaic commented Feb 12, 2021

Hi, I wanted to use this JS implementation with direct html injection. But when the formData should be implemented I have this error : Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'
Here is the script I used, is there something wrong ?

  const toPDF = pipe(
    gotenberg('http://localhost:3000'),
    convert,
    html,
    please
  )
  const pdf = await toPDF("<html><head></head><body>Make my day</body></html>")
  pdf.pipe(fs.createWriteStream('index.pdf'))`
@yumauri
Copy link
Owner

yumauri commented Feb 12, 2021

Hello!
Hm, code looks fine to me...
I've just tried exactly the same code and got no error.
Can you share version of NodeJS and version of this library you use?

@crenardaaaic
Copy link
Author

crenardaaaic commented Feb 12, 2021

Wow that's a quick answer, thanks 👍
Here are the versions :
Node: v12.16.1
gotenberg-js-client: v0.7.0

By the way, the application is in VueJs 2.0

@yumauri
Copy link
Owner

yumauri commented Feb 12, 2021

Wait, I got suspicious when I saw Blob, because NodeJS doesn't have Blob type, this is browser thing.

This is server-side library.

In theory used approach should possible work in browser, but as for now library is relying on NodeJS types and objects. Sorry...

@crenardaaaic
Copy link
Author

Holly molly ... too bad :(

Anyway thanks for your super reactivity 👍

@yumauri
Copy link
Owner

yumauri commented Feb 12, 2021

I've created issue #2 long time ago, to track this feature, but have no time since to escalate :(

I will appreciate for PR to add isomorphic features in this package :)

@yumauri
Copy link
Owner

yumauri commented Mar 9, 2021

mantra
I will make this package isomorphic,
I will make this package isomorphic,
I will...

But for now I'll close this issue

@yumauri yumauri closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants