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