title: 413 request error while using Shiny
body: <p>I am developing a web application through shiny.</p>
  
  <p>I am trying to upload my files using the fileinput() in shiny.</p>
  
  <p>I have my code working. I intially tried to upload a file of 1.38KB and worked fine.</p>
  
  <p>later when I tried to upload a file approximately 1.58MB, it throws me an error,</p>
  
  <pre><code>&gt;   &gt;      &lt;html&gt;  &lt;head&gt;&lt;title&gt;413 Request Entity Too Large&lt;/title&gt;&lt;/head&gt;  &lt;body bgcolor="white"&gt;  &lt;center&gt;&lt;h1&gt;413 Request
  &gt; Entity Too Large&lt;/h1&gt;&lt;/center&gt;  &lt;hr&gt;&lt;center&gt;nginx/1.12.1&lt;/center&gt; 
  &gt; &lt;/body&gt;
  </code></pre>
  
  <p>Could anyone help me, how i could avoid this error ?</p>
  
  <p>Below is the code for Ui and Server I am using.</p>
  
  <pre><code>ui &lt;- fluidPage(
  
    # App title ----
    titlePanel("Uploading Files"),
  
    # Sidebar layout with input and output definitions ----
    sidebarLayout(
  
      # Sidebar panel for inputs ----
      sidebarPanel(
  
        # Input: Select a file ----
        fileInput("file1", "Choose CSV File",
                  multiple = TRUE,
                  accept = c("text/csv",
                             "text/comma-separated-values,text/plain",
                             ".csv")),
  
        # Horizontal line ----
        tags$hr(),
  
        # Input: Checkbox if file has header ----
        checkboxInput("header", "Header", TRUE),
  
        # Input: Select separator ----
        radioButtons("sep", "Separator",
                     choices = c(Comma = ",",
                                 Semicolon = ";",
                                 Tab = "\t"),
                     selected = ","),
  
        # Input: Select quotes ----
        radioButtons("quote", "Quote",
                     choices = c(None = "",
                                 "Double Quote" = '"',
                                 "Single Quote" = "'"),
                     selected = '"'),
  
        # Horizontal line ----
        tags$hr(),
  
        # Input: Select number of rows to display ----
        radioButtons("disp", "Display",
                     choices = c(Head = "head",
                                 All = "all"),
                     selected = "head")
  
      ),
  
      # Main panel for displaying outputs ----
      mainPanel(
  
        # Output: Data file ----
        tableOutput("contents")
  
      )
  
    )
  )
  </code></pre>
  
  <p>Server Code</p>
  
  <pre><code>shiny.maxRequestSize=30*1024^2
  server &lt;- function(input, output) {
  
    output$contents &lt;- renderTable({
  
      # input$file1 will be NULL initially. After the user selects
      # and uploads a file, head of that data file by default,
      # or all rows if selected, will be shown.
  
      req(input$file1)
  
      df &lt;- read.csv(input$file1$datapath,
                     header = input$header,
                     sep = input$sep,
                     quote = input$quote)
  
      if(input$disp == "head") {
        return(head(df))
      }
      else {
        return(df)
      }
  
    })
  
  }
  </code></pre>
  
  <p>From web, I also found that I could increase the capacity , and have added a piece of code above my server function.</p>
  
  <p>EDIT: Adding the console with error</p>
  
  <p><a href="https://i.stack.imgur.com/Brkfi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Brkfi.png" alt="when I upload my file, this is the error shown"></a></p>