Hi,
Thanks for a great module!
The only thing missing for me was the option to have user-private directories. By this I mean that each user, rather than each role, potentially gets a directory holding files and sub-directories that only they may view, e.g. "private/rik", "private/Dries".
The user-private directories may be populated by the webfm administrator or by the user themselve, provided the use, i.e. the role, has the "webfm upload" permission.
In the latter case, the user-private directory is created automatically when the user uploads their first file, so there is no need for the administrator to pre-create (empty) directories for all users on the system (which could be thousands).
See also:
o #193699: Per user
o #220565: Private Folder Access for Each User (100,000 users)
o #555528: Private folder for each user
o #759448: Web File Manager associated with subscription users/registered users
To enhance your existing WebFM install with this feature, either apply the attached patch or simply unzip the attached webfm.tar.gz, which contains the full versions of the patched files webfm.module and webfm.admin.inc, over the top of the originals of your WebFM 6-x.2-12 install.
Please note that the patch was created against WebFM 6-x.2-12, not the dev version.
Once you have applied the patch, you switch this feature on simply by going to Administer >> Site configuration >> Web File Manager and entering in the second text box a valid user-private root directory name, for instance "private".
Users who now navigate to Web File Manager (i.e. .../webfm) and have the "webfm upload" permission, can now choose to upload files to either their role-wide or user-private directories. Where there's ambiguity a tick-box will appear for the user to select the desired area.
Note that until the user-private directory has content the tree will not show.
| Comment | File | Size | Author |
|---|---|---|---|
| webfm.tgz | 32.68 KB | rdeboer | |
| webfm-6--2-12-user-private.patch | 8.71 KB | rdeboer |
Comments
Comment #1
davidir81 commentedHello,
I was using this patches but I was unable to rename folders, so I test your patch but in the configuration page I can't see the option to enable cron to "Insert Files Into Database" that it has the normal version.
Do you have any idea why has disappeared?
Thanks a lot!
David
Comment #2
davidir81 commentedI have seen that some configurations has been deleted.
If you insert into function webfm_cron() the newxt sentence you can activate the autoinsertion with the cron:
$err_arr[] = array();
$root_dir = file_directory_path().webfm_get_root_path();
$result = webfm_insert_dir($root_dir, TRUE, $err_arr);
if($result->errcnt)
watchdog('cron', 'WebFM file insertion errors.', $err_arr, WATCHDOG_ERROR);
if($result->cnt)
watchdog('cron', 'WebFM inserted %num files.', array('%num'=>$result->cnt), WATCHDOG_NOTICE);
Comment #3
davidir81 commentedWhen the CRON is running automaticly the insertions fails: "WebFM file insertion errors", but when you run cron manually works fine!
ANY IDEA?
Thanks!
Comment #4
tazus commentedsubscribe
Comment #5
pritam-osl commentedhi,
It works fine but while uploading a file by user not having 'administer webfm' permission it shows a error :
"..............has an invalid extension"
'Permitted file extensions' are is set for each user.
thank you
Comment #6
shvinod commentedAny plan to release a patch for 6.x-2.15 release?