Download file, retrieved from port on the local server

109 Views Asked by At

I had some trouble explaining my question in short for the title, so here the full explanation.

I'm exploring couchDB for a schoolproject and have come across a probably small issue. On the server I'm able to retrieve a file from http://localhost:5984/bibliography/c452b83c3a3dd1ce5b13f18b37000aa3/3567149.pdf I created a link to this using a button:.

<a style="text-align:left" href="http://localhost:5984/bibliography/c452b83c3a3dd1ce5b13f18b37000aa3/3567149.pdf" target="_blank" class="btn btn-default">
<span class="glyphicon glyphicon-file"></span>
3567149.pdf
</a>

This was no problem whilst I was running the application on my local machine, but this doesn't work on my VPS, since this port is not accessible from the outside.

I think my best option would be to retrieve the file using php, and then prompt the user to download it. But I can't find out how to do this.

0

There are 0 best solutions below