python - download file link produces 404 page -


i trying create link allows user download zip file that's been generated earlier in python script. script writes html link web page. user should able click link , download zip file.

import os,sys downloadzip = ("http://<server>/folder/structure/here/" + zipfilename + ".zip") print """<h3><a href="{}" download>download zip file</a></h3>""".format(downloadzip) 

the result link when clicked opens 404 page. i've noticed on page, displays

physical path      c:\inetpub\wwwroot\inputted\path\here\file.zip 

i testing on same server processing occurring on. wouldn't think should make difference, here am. end result should zip file downloaded user's pc.

not sure if helpful or not have noticed 'server package apps' disallow execution/download of filetypes. had similar thing happen years ago.

to test if case, create new folder in web directory , add index.html page random writing (to identify have correct page). try access page.

next create .zip file, put in same folder index.html file created, , add download link on index.html page.

now revisit page, , try download file created. if works there problem elsewhere, if doesn't whatever server package application using set apache block .zip files default. hope helps buddy :)


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -