From: Tom Hughes Date: Sat, 18 Aug 2007 20:49:15 +0000 (+0000) Subject: Handle files uploaded via the API properly. X-Git-Tag: live~8234 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9f58d1724260a9ef69a7c3dc69d81af4dd7d595d?ds=sidebyside Handle files uploaded via the API properly. --- diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 2001fdb2f..f7b56e769 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -203,7 +203,7 @@ class TraceController < ApplicationController name = params[:file].original_filename.gsub(/[^a-zA-Z0-9.]/, '_') # This makes sure filenames are sane do_create(name, params[:tags], params[:description], params[:public]) do |f| - f.write(request[:file].read) + f.write(params[:file].read) end if @trace.id