sandrods / odf-report

Generates ODF files, given a template (.odt) and data, replacing tags

Home Page:http://sandrods.github.com/odf-report

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0.5.1 Introduced Error: String contains null byte

vanboom opened this issue · comments

commented

Thanks for such a cool gem! With version 0.5.1, I am getting an error "String contains null byte" when I use send_file to send the converted odt file to the user.

Reverting back to 0.4.3 the error goes away.

Thanks,
Don

Don,

I've changed the behaviour of the generate method.

Now it returns the actual report file, and you have to use send_data:

  send_data report.generate, type: 'application/vnd.oasis.opendocument.text',
                              disposition: 'attachment',
                              filename: 'report.odt'

Ping me if it does not work for you

commented

Thanks!