]> git.p6c8.net - devedit.git/blobdiff - modules/Command.pm
Allow to specify a remote name for an uploaded file
[devedit.git] / modules / Command.pm
index 28c6777a19415888e109640888e2e3936030f2da..2905545490d5458f307697871485ceefb89e12fd 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-08-01
+# Last modified: 2009-03-30
 #
 
 use strict;
 #
 
 use strict;
@@ -521,6 +521,14 @@ sub exec_upload($$)
 
  if(my $uploaded_file = $cgi->param('uploaded_file'))
  {
 
  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);
   # Process file upload
 
   my $filename  = file_name($uploaded_file);

patrick-canterino.de