Upload arbitrary binary file to a pin

How can I upload an arbitrary file to pin on an RStudio Server? It seems I can only upload a limited set of formats, such as CSV and RDS.

library(pins)
library(qs)
tempf.qs <- tempfile(fileext = ".qs")
mtcars2 <- as.list(mtcars)
qs::qsave(mtcars2, tempf.qs)
pin(tempf.qs, name = "mtcars2", board = "rsconnect")

Interesting - this definitely should work. Are you talking about pinning to RStudio Connect, I presume (by your tags)?

It looks like your code is working to me! (Minus a few tweaks for naming :see_no_evil:)

  
library(pins)
library(qs)
#> qs v0.24.1.
tempf.qs <- tempfile(fileext = ".qs")
mtcars2 <- as.list(mtcars)
qs::qsave(mtcars2, tempf.qs)
pins::board_register_rsconnect(server = "cole")
(pin(tempf.qs, name = "cole/mtcars3", board = "rsconnect"))
#> [1] "/Users/carendt/Library/Caches/pins/rsconnect/cole/mtcars3/file1e111d634901.qs"

(hm <- pins::pin_get("cole/mtcars3"))
#> [1] "/Users/carendt/Library/Caches/pins/rsconnect/cole/mtcars3/file1e111d634901.qs"

Created on 2021-03-17 by the reprex package (v0.3.0)