Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
palidanx  
#1 Posted : Tuesday, February 16, 2010 10:21:38 AM(UTC)
palidanx

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?
palidanx  
#2 Posted : Tuesday, February 16, 2010 10:28:22 AM(UTC)
palidanx

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?
palidanx  
#3 Posted : Tuesday, February 16, 2010 10:59:28 AM(UTC)
palidanx

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...?
palidanx  
#4 Posted : Tuesday, February 16, 2010 11:05:57 AM(UTC)
palidanx

Rank: Newbie

Groups: Member
Joined: 2/16/2010(UTC)
Posts: 4

nvm.. i forgot to add the event listener.

iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
Tamila  
#5 Posted : Tuesday, February 16, 2010 10:09:28 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
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 Support Team

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.