title: How to handle uploaded zip file in Dash plotly?
body: <p>Using the <code>dcc.Upload</code>, you can build a drag and drop or button-based uploading feature in Dash Plotly dashboard. However, there is a limit in the documentation on handling a specific filetype such as <code>.zip</code>. Here's a snippet of the uploading html:</p>
  
  <pre><code>dcc.Upload(
      id='upload_prediction',
      children=html.Div([
          'Drag and Drop or ',
          html.A('Select Files'),
          ' New Predictions (*.zip)'
      ]),
      style={
          'width': '100%',
          'height': '60px',
          'lineHeight': '60px',
          'borderWidth': '1px',
          'borderStyle': 'dashed',
          'borderRadius': '5px',
          'textAlign': 'center',
          'margin': '10px'
      },
      accept=".zip",
      multiple=True
  )
  </code></pre>
  
  <p>Then when I try to examine the uploaded file with this snippet:</p>
  
  <pre><code>@app.callback(Output('output_uploaded', 'children'),
                [Input('upload_prediction', 'contents')],
                [State('upload_prediction', 'filename'),
                 State('upload_prediction', 'last_modified')])
  def test_callback(list_of_contents, list_of_names, list_of_dates):
      for content in list_of_contents:
          print(content)
  </code></pre>
  
  <p>The content-type after uploading is ‘data:application/x-zip-compressed;base64’. How to handle this type of file in Dash Plotly (for example to extract it somewhere)?</p>
  
  <p>A similar question was asked in the plotly forum without answers:
  <a href="https://community.plot.ly/t/dcc-upload-zip-file/33976" rel="nofollow noreferrer">https://community.plot.ly/t/dcc-upload-zip-file/33976</a></p>