Re: How do I correctly encode filenames for use in https-response "content-disposition" header?

2013-10-14 Thread DJ-Tom
Good idea - I will try if this helps - for now I'm replacing spaces with underscores which works as well. Am Freitag, 11. Oktober 2013 16:29:32 UTC+2 schrieb ke1g: > > Not sure, but perhaps you need quotes around the file name to avoid having > the user agent terminate the filename on space? E.

Re: How do I correctly encode filenames for use in https-response "content-disposition" header?

2013-10-11 Thread Bill Freeman
Not sure, but perhaps you need quotes around the file name to avoid having the user agent terminate the filename on space? E.g.; ..."attachement; filename=" + '"' + rep_setup..+ '.xlsx"' On Fri, Oct 11, 2013 at 6:27 AM, DJ-Tom wrote: > Hi, > > I'm serving files via HttpResponse and cur

How do I correctly encode filenames for use in https-response "content-disposition" header?

2013-10-11 Thread DJ-Tom
Hi, I'm serving files via HttpResponse and currently I'm struggling with spaces in the filenames. This is how I contruct the response header: response = HttpResponse(report.reportfile.chunks(), mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") respon