Closed DavZim closed 2 years ago
@DavZim thanks for clean report, appreciate! Please try latest commit from the dev
branch and see if it works
Works perfectly for me. Thank you for the fast response.
Is there anything I can help you with to get this to CRAN?
Will take some time to publish to CRAN. You can help to cover this fixed bug with tests, PR welcome!
On Wed, 16 Mar 2022, 18:36 DavZim, @.***> wrote:
Works perfectly for me. Thank you for the fast response.
Is there anything I can help you with to get this to CRAN?
— Reply to this email directly, view it on GitHub https://github.com/rexyai/RestRserve/issues/180#issuecomment-1068975429, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHC5XLWX6DEA7QM6DAJG6LVAG2TFANCNFSM5Q3HGRYA . You are receiving this because you commented.Message ID: @.***>
Sure, I'll look into it. Quick question regarding the added tests:
test-app-content-handlers.R
tempfiles()
(probably even better to use tempdir() and serve this then as a static route. This would be done in the setup.R / example-app "content-handlers".Is that OK for you or do you have a better idea?
sounds perfect!
On Thu, 17 Mar 2022, 14:31 DavZim, @.***> wrote:
Sure, I'll look into it. Quick question regarding the added tests:
- I would put the extra tests in test-app-content-handlers.R https://github.com/rexyai/RestRserve/blob/dev/inst/tinytest/test-app-content-handlers.R
- As this requires writing files, I would create tempfiles() (probably even better to use tempdir() and serve this then as a static route. This would be done in the setup.R / example-app "content-handlers".
Is that OK for you or do you have a better idea?
— Reply to this email directly, view it on GitHub https://github.com/rexyai/RestRserve/issues/180#issuecomment-1070765978, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHC5XKSWLBBYJKDEPEYVR3VAMCWPANCNFSM5Q3HGRYA . You are receiving this because you commented.Message ID: @.***>
Bug
Serving files via a static endpoint results in an encoding error depending on content-type. csv, rds, jpg, and pdf fail, with:
can't encode body with content_type = 'image/{TYPE}'
. png images and .txt files work however.Reproduction
Expected Behavior
Should return CSV, RDS, JPG, and PDF files as it returns PNG and TXT files.
Environment information
Output of
sessioninfo::session_info()
Outro
Having said that, thank you all so much for this wonderful library, really makes my life easier and is highly appreciated!