How to change the settings in the XUpload pro if you use php and wanne redirect the uploaded File into the users directory?
I already did it once, but for a certain reason i wasn't able to figure out yet, in a new framework the XUpload free refuses to do so.
Ich got the username in $_SESSION['user'] and the upload form itself is secured in a php document which only can becalled from another file. If someone tries to open the file directly the server blocks him and tells him to log in.
Unfortunately the uploader keeps sending the files in /pub instead of /pub/username.
Got any idea on how to get it fixxed again?
I find the bar very useful and it already saved me a lot of time and preserved me from getting grey hairs in university. The block all regular uploads, but luckily the uploader in the old framework did it perfectly.
What to switch wehere to get it back the way it was working?
Kind regards
P.s.
Hey keep the great work up i like the Upload progress bar
XUpload - XUpload Free Multi user
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
FREE xupload NEVER was able to upload to specific folder!
But if you wanna to save to specific user folder, edit this line in upload.cgi:
to
and add hidden field to upload form:
But if you wanna to save to specific user folder, edit this line in upload.cgi:
Code: Select all
&SaveFile2( ${$cg->{'.tmpfiles'}->{$k}->{name}}, $c->{target_dir}, $filename );
Code: Select all
&SaveFile2( ${$cg->{'.tmpfiles'}->{$k}->{name}}, "$c->{target_dir}/".$cg->param('username'), $filename );
Code: Select all
<input type="hidden" name="username" value="my_username">
-
- Posts: 2
- Joined: Sep 21, 2008 2:26 pm