ambiorix icon indicating copy to clipboard operation
ambiorix copied to clipboard

add support for serialization of common file/mime types

Open kennedymwavu opened this issue 1 year ago • 0 comments

new feature

currently, we have handled serialization of the MOST common file types, as seen in the docs.

it would be valuable if we add support for these too:

  • pdf
  • xls
  • xlsx
  • ods

why

most R users often need to generate reports. in most cases, the reports are pdfs, a result of rendering via .Rmd or .qmd.

they also happen to use MS Excel and Libre Office a lot, so exporting of the results of an analysis to an xlsx or ods file is popular.

hint

we can make use of the mime map already in Yihui's {mime} pkg. this will, foreseeably, end up simplifying how the response object handles "file downloads" internally.

in the end, we can have a standardized API for handling "downloads", possibly by extending res$send_file() to handle more file types.

kennedymwavu avatar Sep 11 '24 20:09 kennedymwavu