From d06fca010499832bb70a5fed787fa32aa27b73a2 Mon Sep 17 00:00:00 2001 From: Lokesh Jain Date: Tue, 6 Aug 2019 15:30:14 -0700 Subject: [PATCH] HDFS-14692. Upload button should not encode complete url. Contributed by Lokesh Jain. Signed-off-by: Wei-Chiu Chuang (cherry picked from commit 954ff36360e083010f395cb9d3bd46701417e7b7) (cherry picked from commit f6fe18a282ce0ed729b6b7586c17b2046a612070) --- .../hadoop-hdfs/src/main/webapps/hdfs/explorer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js index 0520192b48f..de9916e5615 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js @@ -442,8 +442,7 @@ for(var i = 0; i < $('#modal-upload-file-input').prop('files').length; i++) { (function() { var file = $('#modal-upload-file-input').prop('files')[i]; - var url = '/webhdfs/v1' + current_directory; - url = encode_path(append_path(url, file.name)); + var url = '/webhdfs/v1' + encode_path(append_path(current_directory, file.name)); url += '?op=CREATE&noredirect=true'; files.push( { file: file } ) files[i].request = $.ajax({