RStudio IDE file upload failure

Having issues uploading files in RStudio IDE and also when using fileinput in R/Shiny.

R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS/LAPACK: /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin/libmkl_rt.so

Attempting to Upload a file through the file explorer window gives a "Error : Parameter value invalid".

Attempting to upload a file through R/Shiny

library(shiny)
library(readxl)

runApp(
  list(
    ui = fluidPage(
      sidebarLayout(
        sidebarPanel(
          fileInput('file1', 'Choose file'
          )
        ),
        mainPanel(
          tableOutput('contents'),
          
          tableOutput('table'))
      )
    ),
    server = function(input, output){
      output$contents <- renderTable({
        req(input$file1)
        inFile <- input$file1
        
      })
      output$table <- renderTable({
        req(input$file1)
        inFile <- input$file1
        readxl::read_xlsx(inFile$datapath, 1)})
    }
  )
)

I'm fairly confident this is an issue with RStudio, because I can run the same r/shiny code in Visual Studio and the upload works correctly.

Any help appreciated.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.