implementing download mechanism

This is the place for queries that don't fit in any of the other categories.

implementing download mechanism

Postby tkansara1 » Fri Mar 28, 2014 1:39 pm


I have a question about implementing download mechanism for an exe file.

Suppose I have a URL out on the internet like This URL is an an <a href> tag on users websites. I want to code the logic to serve an exe file while keeping the users on the 3rd party website. i came up with following solution:
Code: Select all
 myfile = ""

   meta_tag = "<html><head><meta http-equiv='Refresh' Content='1;URL=%s'></head></html>" % myfile
    return HttpResponse(meta_tag, content_type='force-download')   

However, this open a blank page and does serve the file. I do not have the file on my server, Is there a way in which I can I can serve/sernd the file and keep the user on the 3rd part web page? Or would downloading the exe and serving it from my own server be the only option ?

Last edited by Mekire on Fri Mar 28, 2014 2:38 pm, edited 1 time in total.
Reason: Lock.
Posts: 1
Joined: Fri Mar 28, 2014 1:36 pm

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 5 guests