title: My flask application always call the first funciton (download file from S3)
body: <p>I create a simple flask application with 4 download functions to download files from s3. I plan to download different files by clicking different content</p>
  <pre><code>from flask import Flask, Response, render_template
  from boto3 import client
  
  application = Flask(__name__)
  
  bucket_name = 'bucket_name'
  
  def get_client():
      return client(
          's3',
          'us-east-1',
          aws_access_key_id='myid',
          aws_secret_access_key='mykey'
      )
  
  
  
  @application.route('/')
  def home():
      return render_template('Download.html')
  
  @application.route('/download', methods=['GET'])
  def Download_coin_file():
      s3 = get_client()
      target = s3.get_object(Bucket=bucket_name, Key='data/zip_data/token.zip')
      return Response(
          target['Body'].read(),
          mimetype='zip',
          headers={&quot;Content-Disposition&quot;: &quot;attachment;filename=token.zip&quot;}
      )
  
  
  @application.route('/download', methods=['GET'])
  def Download_transaction_file():
      s3 = get_client()
      target = s3.get_object(Bucket=bucket_name, Key='data/zip_data/transaction.zip')
      return Response(
          target['Body'].read(),
          mimetype='zip',
          headers={&quot;Content-Disposition&quot;: &quot;attachment;filename=transaction.zip&quot;}
      )
  
  @application.route('/download', methods=['GET'])
  def Download_index_file():
      s3 = get_client()
      target = s3.get_object(Bucket=bucket_name, Key='data/zip_data/index.zip')
      return Response(
          target['Body'].read(),
          mimetype='zip',
          headers={&quot;Content-Disposition&quot;: &quot;attachment;filename=index.zip&quot;}
      )
  
  @application.route('/download', methods=['GET'])
  def Download_commodity_file():
      s3 = get_client()
      target = s3.get_object(Bucket=bucket_name, Key='data/zip_data/commodity.zip')
      return Response(
          target['Body'].read(),
          mimetype='zip',
          headers={&quot;Content-Disposition&quot;: &quot;attachment;filename=commodity.zip&quot;}
      )
  
  
  if __name__ == &quot;__main__&quot;:
      application.run(debug=True)
  </code></pre>
  <p>The &quot;download.html&quot; file:</p>
  <pre><code>&lt;h2&gt;Download cryptocurrency datasets&lt;/h2&gt;
  &lt;p&gt;
    &lt;a&gt;NOTICE: Downloading a huge size set may take a little while:)&lt;/a&gt;
  &lt;/p&gt;
  &lt;ul&gt;
    &lt;p&gt;
      &lt;li&gt;&lt;a href=&quot;{{url_for('application.Download_coin_file')}}&quot;&gt;Download_token_data(1100+ tokens price data)&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;li&gt;&lt;a href=&quot;{{url_for('application.Download_transaction_file')}}&quot;&gt;Download_transaction_data(ETH transaction data)&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;li&gt;&lt;a href=&quot;{{url_for('application.Download_index_file')}}&quot;&gt;Download_index_data (1300+ U.S. staock index data)&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;li&gt;&lt;a href=&quot;{{url_for('application.Download_commodity_file')}}&quot;&gt;Download_commodity_data (66 commodities price data)&lt;/a&gt;
    &lt;/p&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>However, no matter which links I click, the application will call the first function(download_coin_file) and start to download the &quot;token.zip&quot; file. How to fix the problem?</p>