I want to make a download button using shiny which would be able to download the password-protected files (pdf/doc/any_other_extension) and write a custom message inside that file. Here is the code for .txt, I have to save the same thing but in a password-protected file. Is there any way to do that?
output$fileDownloader<- downloadHandler(
filename = function() {
paste(glue("password_protected_file_{input$name}_"), as.POSIXlt(Sys.time(), tz = "Asia/Kolkata"), ".txt", sep = "")
},
content = function(file) {
writeLines(glue("message_is_{input$message}_"), file)
}
)