I'm trying to customize the submit workflow to display a warning message if someone tries to submit a file larger than one meg. However I can't get the script to work. Also can't print the output of the $size variable. (it does print the output of $file) Thanks in advance for anyone's help.
for (my $i=0; $i<
@submit_file; ++$i)
{
# gets the file size in bytes
my $MAXSIZE = 1048576;
my $file = $iwmount . '/' . $iw_workarea . '/' . $submit_file[$i];
my $size = (stat($file))[7];
......
# inserts the warning text
(($size > $MAXSIZE) ? " (SIZE GREATER THAN $MAXSIZE bytes)" : "") .