title: React pdf onclick download
body: <p>I have a problem with react. I have a program that embeds a pdf and a download button. I want to download the pdf upon clicking the button.</p>
  <p>Instead, my program redirects me to another page where you download the pdf, meaning it exists in the app but I just want to stay in the same app and download the pdf in my app.</p>
  <p>Are there any plugins that I can use to do this?</p>
  <p>Please find below my code:</p>
  <pre><code>&lt;div&gt;
      &lt;object data={this.props.file} type='application/pdf'&gt;
          &lt;embed src={this.props.file} type='application/pdf' /&gt;
      &lt;/object&gt;
      {
       this.props.author ==='bot' ?
          &lt;a href={this.props.file} download={this.props.file}&gt;
              &lt;input alt='download' type={'image'} src={download} /&gt;
          &lt;/a&gt;
       :
          ''
      }
   &lt;/div&gt;
  </code></pre>