# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-08-01
+# Last modified: 2009-03-30
#
use strict;
if(my $uploaded_file = $cgi->param('uploaded_file'))
{
+ if($cgi->param('remote_file'))
+ {
+ $uploaded_file = $cgi->param('remote_file');
+
+ $uploaded_file =~ s!/!!g;
+ $uploaded_file =~ s!\\!!g;
+ }
+
# Process file upload
my $filename = file_name($uploaded_file);
<p>File to upload:<br>
<input type="file" name="uploaded_file" size="35"></p>
+<p>Remote name of the file (optional):<br>
+<input type="text" name="remote_file" size="35"></p>
+
<p>Transfer mode (see below):<br>
<input type="radio" name="ascii" id="ascii" value="1"><label for="ascii">ASCII</label> <input type="radio" name="ascii" id="binary" value="0" checked><label for="binary">Binary (default)</label></p>
<li><b>Binary:</b> The file will be uploaded as it is. Use this transfer mode for images, executable files and archives, for example. This is the default transfer mode.</li>
</ul>
+<p><b>Note:</b></p>
+
+<ul>
+<li>If you specify an other remote name for the uploaded file, all slashes and backslashes will be removed from the entered value.</li>
+</ul>
+
<hr>
<p align="right"><a href="{SCRIPT}?command=about" target="_blank"><i>About Dev-Editor</i></a></p>