Uploadify authentication problem

I’m trying to use Uploadify in my project. Everything works in my
machine, locally. The problem is when I use the same code in my
production environment.
When I try to upload a photo, it returns an error “HTTP 401”, but there
are no errors in the log.

Rails(2.3.5)
Uploadify(2.1.0)

Here is my FlashSessionCookieMiddleware where the problem with the Flash
authentication shoud be solved.

require ‘rack/utils’

class FlashSessionCookieMiddleware
def initialize(app, session_key = ‘_session_id’)
@app = app
@session_key = session_key
end

def call(env)
if env[‘HTTP_USER_AGENT’] =~ /^(Adobe|Shockwave) Flash/
req = Rack::Request.new(env)
env[‘HTTP_COOKIE’] =
“#{@session_key}=#{req.params[@session_key]}”.freeze unless
req.params[@session_key].nil?
end
@app.call(env) if @app
end
end

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs