-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cant convert using buffer #20
Comments
Hello, @agustinparamio ! There is, actually! import { gotenberg, pipe, ping, please } from 'gotenberg-js-client'
// ...
pipe(
gotenberg('http://localhost:3000'),
ping,
please
)({}) // <- empty source object to satisfy typings
.then(() => console.log('Gotenberg is up'))
.catch((error) => console.error('Gotenberg is down:', error)) Ping request returns nothing ( try {
await pipe(gotenberg('http://localhost:3000'), ping, please)({})
console.log('Gotenberg is up')
} catch (error) {
console.error('Gotenberg is down:', error)
} Do you have any errors on your or Gotenberg sides? |
Hi @yumauri, thank you for the answer. I tried some versions of the following code but I couldn't fix the error I got..
and got this error also tried using an axios request but im blocked by cors policy and from what I can see on gotemberg doc i cant change that. gotenberg cant be used from react? |
Hm, I'm a bit cautious of you mentioning "cors policy" — are you trying to use this client from the browser or I misunderstood that? |
yes, im trying to use it from a react app |
Unfortunately, for now this is only server-side client, for Node.js :( Technically it is possible (I hope) to adopt it for browser also, I created issue #2 for that long ago, but as for now there are some node specific functions and classes are used, and it is impossible to use this library out-of-the box in the browser, sorry. I will appreciate for PR to add isomorphic features in this package :) Also, you are the first, trying to use this client from the browser, there wasn't any real demand for that. Now, I think, I'll try to spare some time for that task in near future. (But you will have to deal with CORS anyways, with or without my library, if Gotenberg is deployed on a different origin). |
Thank you @yumauri , will try something else then |
Related to CORS, as far as I understand, official Gotenberg position is that you should add some proxy (Nginx for example) before Gotenberg instance, where you can easily add CORS headers. |
Hi,
I tried the convert office file passing buffer but I have no response.
Im downloading a file from s3 (uint8array) converting it to arraybuffer and using:
Any way to check if the api is up with the ping request? I didnt see it on the doc
The text was updated successfully, but these errors were encountered: