title: download csv file in Dash
body: <p>I am building an app with Dash plotly, and the app has the option to save a csv file (that create during the running time of the app), but I have problem with saving the csv file.</p>
  
  <p>What I was trying to do is to use <code>html.A</code> component, and set the <code>href</code> attribute with this data:</p>
  
  <pre><code>csv_string = df.to_csv(encoding='utf-8', index=True)
  csv_string = "data:text/csv;charset=utf-8," + urllib.parse.quote(csv_string)
  </code></pre>
  
  <p>the <code>csv_string</code> is the data I assigned to <code>href</code> attribute.
  I saw someone recommended on this approach, and it's really seems to work.</p>
  
  <p>The problem appeared when the Data frame is too big. When this happened there is a download error when trying to save the file.</p>
  
  <ol>
  <li><p>Do you think I classified the problem correctly? Is it really possible to be a size problem?</p></li>
  <li><p>What do you think I can do to fix this problem? is there any other solution for saving the file? I need to say that I don't want to download the file to static folder. I need to have solution that download the file to the default download folder of the user or enable the user to have the option to select the folder he would like to save the file into (with windows that pop up maybe).</p></li>
  </ol>
  
  <p><strong>Edit:</strong>
  I found this link: <a href="http://chandrewz.github.io/blog/downloading-large-csv-files-via-href" rel="nofollow noreferrer">http://chandrewz.github.io/blog/downloading-large-csv-files-via-href</a> that describe exactly the problem I have. Is there a solution similar to what the author suggest in Python?</p>