Sometimes it helps to use a browser() to see what you are working with.
#* Plot a histogram
#* @param image:file
#* @post /test_image_upload
function(image) {
browser()
magick:image_read(image)
}
From this, we can see that image is a list of length one. The first element in the list is a raw vector containing the uploaded file in binary form.
From there you can use
library(magick)
#* Plot a picture
#* @param image:file
#* @post /test_image_upload
function(image) {
image_read(image[[1]])
# processing
"done"
}
There is an example here Annotations reference • plumber of working with files.