X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3aa8292d6dc3356012d7e335e719f3d76d40b0ce..fea1b5b88de731dd35d1f79d36ec40a8e8a1f6af:/app/controllers/traces_controller.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 9ebad1613..43977c3ce 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -256,7 +256,7 @@ class TracesController < ApplicationController filename = "/tmp/#{rand}" # ...and save the uploaded file to that location - File.open(filename, "wb") { |f| f.write(file.read) } + File.binwrite(filename, file.read) # Create the trace object, falsely marked as already # inserted to stop the import daemon trying to load it