# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-08-02
+# Last modified: 2004-08-29
#
use strict;
my $file_phys = $physical."/".$filename;
my $file_virt = $virtual."".$filename;
- return error($config->{'errors'}->{'file_exists'},$virtual,{FILE => $file_virt}) if(-e $file_phys);
+ return error($config->{'errors'}->{'file_exists'},$virtual,{FILE => $file_virt}) if(-e $file_phys && not $cgi->param('overwrite'));
my $ascii = $cgi->param('ascii');
my $handle = $cgi->upload('uploaded_file');
<p>Transfer mode (see below):<br>
<input type="radio" name="ascii" value="1">ASCII <input type="radio" name="ascii" value="0" checked>Binary (default)</p>
+<p><input type="checkbox" name="overwrite">Overwrite file if it already exists</p>
+
<p><input type="submit" value="Upload file!"></p>
</form>