[LRUG] AJAX file uploads and content types
Andrew Stewart
boss at airbladesoftware.com
Wed Apr 4 02:24:49 PDT 2012
On 4 Apr 2012, at 11:14, Graham Ashton wrote:
> When that used to happen to me, my quick and dirty solution was to open a file of my own choosing and to write to that instead...
>
> File.open(path, 'a') { |f| f.puts("useful info") }
That's a nice piece of lateral thinking -- thank you.
I tried this, writing to a text file in the root of my Rails app, but no text file appeared. Which seems to imply the middleware isn't being executed. Which is odd because it's listed by rake middleware:
use Rack::Lock
use ActiveSupport::Cache::Strategy::LocalCache
use Rack::Runtime
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use ActionDispatch::RemoteIp
use Rack::Sendfile
use ActionDispatch::Callbacks
use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
use ActionDispatch::ParamsParser
use Remotipart::Middleware <-- remotipart
use Rack::MethodOverride
use ActionDispatch::Head
use ActionDispatch::BestStandardsSupport
use ExceptionNotifier
run Sparkle::Application.routes
The thick plottens, as they say...
Cheers,
Andy
More information about the Chat
mailing list