]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/export.erb
Tile: Modify ModTileRequestTimeout 3->2 to better avoid apache max-clients under...
[chef.git] / cookbooks / tile / templates / default / export.erb
old mode 100755 (executable)
new mode 100644 (file)
index ae37fee..d178df4
@@ -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()