yumauri / gotenberg-js-client

A simple JS/TS client for interacting with a Gotenberg API
MIT License
111 stars 9 forks source link

Request body larger than maxBodyLength limit #50

Closed janswist closed 1 year ago

janswist commented 2 years ago

I have very standard config and I get this error. With Postman my Cloud Run instance works just fine.

const document =  {
    name: '12345.docx',
    encoding: '7bit',
    mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    data: <Buffer numbers here bla bla ... 407437 more bytes>,
    size: 407487
}
   const {
      pipe,
      gotenberg,
      convert,
      office,
      to,
      landscape,
      set,
      filename,
      please,
    } = require('gotenberg-js-client')

    const toPDF = pipe(
      gotenberg(<CLOUD_RUN_INSTANCE>),
      convert,
      office,
      please
    )
    const pdf = await toPDF({ [`resultAsd.docx`]: document.data })
yumauri commented 2 years ago

Hello! Sorry for late response, I'm being away from laptop. This is strange error, can you show me full exception stacktrace? Only maxBodyLength mentions I found are related to axios, but this library doesn't use axios (by default).