XUpload - Dynamic url_post??

Message
Author
sparkacus
Posts: 1
Joined: Feb 10, 2009 4:53 am

Dynamic url_post??

#1 Postby sparkacus » Feb 10, 2009 5:04 am

My upload form may be opened from different pages of my web site and I would like the user to return to the originating page. Can I capture the url the upload is invoked, and dynamically put that url in the url_post variable?

Thanks. Everything else is working just fine. I think you have a great product.

kaboume
Posts: 10
Joined: Feb 06, 2009 12:59 pm

#2 Postby kaboume » Feb 16, 2009 12:41 pm

1/ Replace in upload.cgi :

Code: Select all

my $url_post = $c->{url_post} || $ENV{HTTP_REFERER};
with

Code: Select all

my $url_post = $cg->param('url_post') || $c->{url_post} || $ENV{HTTP_REFERER};
2/ Add a input hidden url_post in your form with absolute url

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#3 Postby PilgrimX182 » Feb 18, 2009 8:42 am

Correct. Thanks ;)