Hello, i have a question related the folders in which users upload their files.
At the moment the folder for upload is set to \phocadownload\userupload.
Then if user uploads something the additional folder with some blabla "2hg132hk4k" name is created.
I found that each folder is created by system is related to particular user, so this means each newly generated folder in userupload is a storage of some user's only files(if im not mistaken).
I need the administrator to be able to take the files which users upload to the site. So i'd like these sytem-generated folders to be named more user-friendly, for example turn off the complex method of folder naming and name them as user login.
So admin could open his apache...\phocadownload\userupload and see friendly folder tree: User1, User2, John, Salvadore, Jan and so on folder names.
Is there an easy possibility to do so?
User Upload Folders
- Jan
- Phoca Hero
- Posts: 48587
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: User Upload Folders
Hi, the name of folder gets the name of user plus some random string to prevent from duplicity, so to remove it, this needs to be customized in the code 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 25 Jun 2012, 15:53
Re: User Upload Folders
Thank you, I managed so solve the problem : D
PS For those who is interested:
\www\components\com_phocadownload\models\user.php
string with assigning $userFolder=
i changed to
$userFolder = $user->username;
and my Joomla didnt even crash thou Im "zero" at coding
Now folders have name equivalent to users' names. I have a local area website with a few users, so it's good for me ^^
PS For those who is interested:
\www\components\com_phocadownload\models\user.php
string with assigning $userFolder=
i changed to
$userFolder = $user->username;
and my Joomla didnt even crash thou Im "zero" at coding
Now folders have name equivalent to users' names. I have a local area website with a few users, so it's good for me ^^
- Jan
- Phoca Hero
- Posts: 48587
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: User Upload Folders
Ok, thank you for the info.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 20 Jan 2013, 15:44
- Location: Dallas, TX
- Contact:
Re: User Upload Folders
Yes, thank you for the tip. I like this approach, and since joomla does allow for duplicate user names it should prevent duplicity.
- Jan
- Phoca Hero
- Posts: 48587
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: User Upload Folders
Hi, since Phoca Download 3, there is no such option, and folders are created by names only.
Jan
Jan
If you find Phoca extensions useful, please support the project