Cannot download some file extensions using downloadHandler()

Similar to this previous unanswered question: downloadBttn downloading download.htm - shiny - RStudio Community

For some reason it could download .pdf files but not .sas7bdat or .xpt files.
As you can see in screenshot, if I try to download a .sas7bdat file the browser attempts to download downloadButton.htm or downloadButton.txt.
I am confident all filepaths are correct. In fact I was using almost the same code previously to download already existing files and it worked fine.

  output$downloadButton <- downloadHandler(
    filename = function(){input$fileSelect},
    content = function(tempFilePath){
      fullPath <- file.path(paste0(currentDirectory(), "/", input$fileSelect))
      file.copy(fullPath, tempFilePath)

If you know of a fix or an alternative to using downloadhandler please answer.

couldnt download