Closed jooosh closed 4 years ago
Hi @jooosh
Thank you very much for looking into this. I was pretty occupied with programming a management system for covid-19 patients the last days and did not manage to check it my self.
I noticed that Yii 2.0 actually has a sendFile method. Maybe it would be even better to leverage this functionality directly. Although I want to dig into the code, to see what the function is actually doing. https://www.yiiframework.com/doc/api/2.0/yii-web-response#sendFile()-detail
Hi Ramon. Glad to help! What's the best way to get this update from the plugin? Will you push a new release?
I only ask as it would be groovy to have the plugin update from the Craft Plugin Store, but it's currently on version 2.3.1:
Hoping you would maybe push a 2.3.2 release.
Or should I just update composer.json to point to another branch?
Thanks in advance!
Thanks for reminding me of this. I switched to programming in go quite a while ago and this does not require any separate package management. The version 2.3.2 should now be available via packagist.
You bet! I just ran the plugin update in Craft and everything worked like a charm. Thanks again for the support and the great plugin. Cheers!
Hi Ramon,
I dug into the codebase and found a fix for the null being appended to the content. Needed to add the content-length to general header section (non-pdfs).
I also discovered that mime-types were not being set properly. Per this solution, I added line 63 setting the response format to raw. You may even be able to remove the PDF specific section now with this in place but I didn't want to mess with it.
Things seems to be solid on my end now.
Thanks again!