Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
before_filter :login_required halts http 200 for java upload app for ruby on rails
Rank: Newbie
Groups: Member
Joined: 2/16/2010(UTC) Posts: 4
|
Hi there,
In my PhotoController in ruby on rails i have
def PhotoController before_filter :login_required
and when I put that there I get
Filter chain halted as [:login_required] rendered_or_redirected.
And the java upload app complains in an unsuccessful pop-up.
Now if i remove this 'before_filter'
It works fine. (upload complete)
In my method def upload_files end
It ends with render :text=>"" to return a http 200 as a previous poster pointed out.
Anyone have any idea of how to resolve this?
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 2/16/2010(UTC) Posts: 4
|
actually what is happening is when the java upload app submits the request against the rails server, it thinks it is a different session and attempts to reauthenticate. Redirected to http://127.0.0.1:3000/session/new Filter chain halted as [:login_required] rendered_or_redirected. Completed in 11ms (DB: 4) | 302 Found [http://127.0.0.1/photos/upload_images] Question: How do I make the call from the java app be in context of the same session request?
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 2/16/2010(UTC) Posts: 4
|
Also I'm setting the cookie here..
function ImageUploader_BeforeUpload(){
if (iu.getControlType() == "Java") getImageUploader("ImageUploader").AddCookie( '_hcw_session=<%=cookies[:_hcw_session]%>');
}
BUt it doesn't seem to be set when looking at tcpmon...?
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 2/16/2010(UTC) Posts: 4
|
nvm.. i forgot to add the event listener.
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
|
|
|
|
Rank: Advanced Member
Groups: Administration
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hello,
Do you experience this problem using ActiveX control (IE browser)? If it is working properly, I suppose that you pointed not all cookie variables in AddCookie method. If you have several cookies you should separate them by ";" without spaces.
|
|
|
|
|
Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
before_filter :login_required halts http 200 for java upload app for ruby on rails
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.