viktork
Posts: 22
|
Posted: 10/22/2011, 10:50 AM |
|
Has anybody solve the issue with Dynamic Folders?
As per help instruction this works only for upload, but not afterwords for editing.
global $files;
$files->file->FileFolder = "/www/files/" . CCGetUserLogin() . "/";
The following topics are still open http://forums.codecharge.com/posts.php?post_id=101867 http://forums.codecharge.com/posts.php?post_id=102067
Anybody solve the problem with setting FileFolder and then using it for Edit/Delete the record?
Thanks
|
|
|
kirchaj
Posts: 215
|
Posted: 10/24/2011, 5:59 AM |
|
viktork,
I think I do something similar with an editable grid and in the beforebuilddelete event I set the path, get the user id, get the filename, and do some logging,
$path="/www/files/";
$filename= $grid->$filename->GetValue();
$filenamepath=$path."/".$filename;
unlink($filenamepath);
do some logging
I hope this helps a little.
TK
|
|
|
viktork
Posts: 22
|
Posted: 10/24/2011, 8:01 AM |
|
Kirchaj
Thanks for tip - what you suggest is using 'usual' php coding.
The question is how to utilize and if it is possible to utilized the following feature described in help:
File Upload Component > File Folder.
I'd have thought if it works for 'Before Processing' event - it should also be applicable to all other events. Looks like it is a bug...
|
|
|
Erik
Posts: 1
|
Posted: 11/15/2011, 4:26 AM |
|
Viktork,
What you can do is use:
$Component->FileFolder = your_path
We use that as well in several upload services. You can use if before process file as well as before show of anything else. Should work fine, at least here it is.
|
|
|
|