0

I am trying to download my link from Heroku but I keep getting errors on Heroku server. The link works fine when I used it locally. I am using HTML for the download method. I put the apk file inside my html folder so it should work without directory. Using flask with python.

Here is the code:

<p> Download the app here: </p>
<a href="myapp.apk" download="myapp.apk"> Click here to download!</a>

Here the errors:

Example: It load to this link (not my real link): https://myapp.herokuapp.com/myapp.apk then.....

Not Found

The requested URL was not found on the server. If you entered the URL   manually please check your spelling and try again.

and

Failed to load resource: net::ERR_FAILED

Any ideas?

nothingness
  • 694
  • 3
  • 9
  • 25

1 Answers1

0

Flask doesn't serve static files out of the box, so you may need to tell it what to do. How to serve static files in Flask mentions that you can use send_from_directory to do this.

Community
  • 1
  • 1
Christophe Biocca
  • 3,388
  • 1
  • 23
  • 24