implementing download using a url call

2014-03-27 Thread tanmay . kansara
Hey Guys,

here is what I am trying to solve. 

I have a URL - somesite.com/server/pattern.x?some_more_stuff

This URl is out there as an href tag on users website. Is there a way in which 
I can serve a file(not from my server) while ensuring that the users remain on 
the third party website. I am currently using this :

myfile = "http://download.someothersite.com/somefile.exe";

meta_tag = "" % myfile
return HttpResponse(meta_tag, content_type='force-download')

The above works, however the user gets redirected to a blank page. Would 
downloading and serving the file from my server be a better option? If so, some 
pointers please.

Do let me know what would be an elegant solution. The file sizes should be 
about 500kb(stub files).

Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: implementing download using a url call

2014-03-28 Thread tanmay . kansara
Hey

Sorry, I should make it more clear. We had a 3rd party that was serving stub 
builds and they have their URLs on various pages(random sites). We control the 
sub-domain, so i can send that traffic to wherever I want. I am looking to 
create logic that takes that incoming parameter and serves an exe file. 
With the logic I posted, the user gets the file, but also gets a new blank 
page. I would like to keep the user on the 3rd part website. 

Hope this clarifies. 

Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list