[ic] File Manager
Gert van der Spoel
ic at 3edge.com
Mon Oct 17 12:43:07 EDT 2005
maillists writes:
> Hello List:
>
> I am working on building a "file manager" within Interchange for
> non-admin users. I am stuck trying to set up a way to "delete" files.
> I have a simple tag that I can't seem to make work, and I get nothing in
> the error log.
>
> Here is the tag:
>
> -------------------------------
> UserTag delete-file Routine <<EOR
> sub {
>
> my ($row) = @_;
> my $file = $row->{deletefile};
> unlink($file);
>
> }
> EOR
> -----------------------------
>
> I call it with a form link setting the value of deletefile to the whole
> path of the file that I want to delete.
>
> i.e. [value deletefile] returns:
> /var/www/www.website.com/catalog/pathtofiles/filename.dia
>
> and on a success page I just call the tag like so:
>
> [deletefile]
>
>
> I'm not sure what I am doing wrong.
>
> Anybody have any ideas?
Not sure if it will help, but you could set in your interchange.cfg:
DebugFile /tmp/debug.log
And change: unlink($file) to
unlink($file) || ::logDebug("cannot unlink file: " $file);
Perhaps you can find something in /tmp/debug.log (you might have to create
this file first and then restart IC) .... Long shot...
CU,
Gert
More information about the interchange-users
mailing list