title: I just want that the actionButton works when I click directioning the code ahead
body: <p>I'm a begginer at R and Shiny.
  I just want that the <strong>actionButton</strong> works <strong>when I click</strong> directioning the code ahead...
  It's a interface where the user makes the archive.csv upload, and click on &quot;Submmit&quot; botton and the things continue to work ahead.
  This is the code:</p>
  <pre><code>library(bslib)
  library(rmarkdown)
  
  light &lt;- bs_theme()
  
  # user interface
  ui &lt;- fluidPage(
    
    theme = light,
    tags$title(&quot;WS_musteR&quot;),
    titlePanel(&quot;MusteR&quot;),
    includeCSS(&quot;html/style.css&quot;),
    includeHTML(&quot;html/index.html&quot;),
    
    sidebarLayout(
      sidebarPanel(
        fileInput(&quot;filecsv&quot;, &quot;Insira a tabela CSV&quot;,
          multiple = FALSE,
          accept = c(
            &quot;text/csv&quot;,
            &quot;text/comma-separated-values,text/plain&quot;,
            &quot;.csv&quot;),
          width = NULL,
          buttonLabel = &quot;Browse...&quot;,
          placeholder = &quot;No file selected&quot;
        ),
        
        actionButton(&quot;action&quot;, &quot;Submeter&quot;, class = &quot;btn-success&quot;),
      ),
      mainPanel(
        tableOutput(&quot;contents&quot;)
        #plotOutput(outputId = &quot;distPlot&quot;)
      ),
    ),
  )
  
  # server side
  server &lt;- function(input, output) {
    
      output$contents &lt;- renderTable({
      observeEvent(input$filecsv, {
      file &lt;- input$filecsv
      if (is.null(file)) {
        stop(&quot;Entrada Vazia!&quot;)
      } else {
        ext &lt;- tools::file_ext(file$datapath)
        req(file)
        validate(need(ext == &quot;csv&quot;, &quot;ERROR: Please upload a .csv file!&quot;))
        x &lt;- read.csv(file$datapath, header = input$header)
        print(&quot;Running code...&quot;)
        source(paste0(bibpath,&quot;main-ligs-v1_WS.R&quot;))
      }})
    })
    
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>