X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/53618f52a6a71a020f42d3244b94b9f48816d0d8..94d361b83b4d5cf2b5807684d1bb50f82fbb6b7b:/cookbooks/tile/templates/default/export.erb diff --git a/cookbooks/tile/templates/default/export.erb b/cookbooks/tile/templates/default/export.erb old mode 100755 new mode 100644 index ae37fee3a..d178df4ce --- a/cookbooks/tile/templates/default/export.erb +++ b/cookbooks/tile/templates/default/export.erb @@ -129,21 +129,21 @@ else: output_headers("image/jpeg", "map.jpg", len(jpeg)) sys.stdout.write(jpeg) elif form.getvalue("format") == "svg": - file = tempfile.NamedTemporaryFile() + file = tempfile.NamedTemporaryFile(prefix = "export") surface = cairo.SVGSurface(file.name, map.width, map.height) mapnik.render(map, surface) surface.finish() output_headers("image/svg+xml", "map.svg", file_size(file)) output_file(file) elif form.getvalue("format") == "pdf": - file = tempfile.NamedTemporaryFile() + file = tempfile.NamedTemporaryFile(prefix = "export") surface = cairo.PDFSurface(file.name, map.width, map.height) mapnik.render(map, surface) surface.finish() output_headers("application/pdf", "map.pdf", file_size(file)) output_file(file) elif form.getvalue("format") == "ps": - file = tempfile.NamedTemporaryFile() + file = tempfile.NamedTemporaryFile(prefix = "export") surface = cairo.PSSurface(file.name, map.width, map.height) mapnik.render(map, surface) surface.finish()