Name

check-upload —

ATTRIBUTES

Attribute Pos. Req. Default Description
file Yes Yes
same Yes
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

check-upload is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/UI_Tag/check_upload.coretag
Lines: 27


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: check_upload.coretag,v 1.4 2007-03-30 23:40:54 pajamian Exp $

UserTag check-upload Order     file same
UserTag check-upload PosNumber 2
UserTag check-upload Version   $Revision: 1.4 $
UserTag check-upload Routine   <<EOR
sub {
use File::Copy;
my $file = shift;
my $same = shift;
my $dir = $Vend::Cfg->{ProductDir};
$same = $same ? '' : '+';
if (-s "upload/$file") {
  File::Copy::copy "upload/$file", "$dir/$file$same"
    or return "Couldn't copy uploaded file!";
  unlink "upload/$file";
}
return '';
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!