I have a R Shiny app working well taking data, sending it to python Flask API server for data cleaning, and the output intended sent back to Shiny as an XLS download. However, I'm struggling how to automatticaly receive that XLS in Shiny. Here is my Shiny code:
get_cleaned_xls <- function(upload_id) {
load_url <- paste0(BACKEND_URL, "/v1/download_cleaned_data/", upload_id)
load_request <- httr::GET(load_url)
load <- httr::content(load_request)
message('get_cleaned_xls', upload_id)
paste(load, ".xls", sep = "")
write.xlsx(load, file = 'test.xlsx', asTable = TRUE, borders = "columns", firstRow = TRUE, colWidths = "auto")
The "load" is the actual XLS.