X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6b86b716d15c901ea0c47cac6b4f0fecce035371..cb6eb65466b9c744f5c9601c0d00b10b8b051fe1:/app/controllers/trace_controller.rb?ds=sidebyside diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 05f97bf0d..4b138bdae 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -368,7 +368,7 @@ private filename = "/tmp/#{rand}" # ...and save the uploaded file to that location - File.open(filename, "w") { |f| f.write(file.read) } + File.open(filename, "wb") { |f| f.write(file.read) } # Create the trace object, falsely marked as already # inserted to stop the import daemon trying to load it