| View previous topic :: View next topic |
| Author |
Message |
pc_helferlein
Joined: 21 Sep 2008 Posts: 2
|
Posted: Sep 21, 2008 2:40 pm Post subject: XUpload Free Multi user |
|
|
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  |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Sep 22, 2008 9:51 am Post subject: |
|
|
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:
| Code: | | &SaveFile2( ${$cg->{'.tmpfiles'}->{$k}->{name}}, $c->{target_dir}, $filename ); |
to
| Code: | | &SaveFile2( ${$cg->{'.tmpfiles'}->{$k}->{name}}, "$c->{target_dir}/".$cg->param('username'), $filename ); |
and add hidden field to upload form:
| Code: | | <input type="hidden" name="username" value="my_username"> |
|
|
| Back to top |
|
 |
pc_helferlein
Joined: 21 Sep 2008 Posts: 2
|
Posted: Sep 23, 2008 8:53 am Post subject: |
|
|
Although XUpload never was supposed to do a multi user upload it easily can be told to do so thanks to the clear and efficient code of yours.
Man your doin a real great job with your scripts keep it up.
You earned my respect.
Kind regards |
|
| Back to top |
|
 |
|