HDFS-14692. Upload button should not encode complete url. Contributed by Lokesh Jain.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
Lokesh Jain 2019-08-06 15:30:14 -07:00 committed by Wei-Chiu Chuang
parent 8cef9f89f4
commit 954ff36360

View File

@ -442,8 +442,7 @@
for(var i = 0; i < $('#modal-upload-file-input').prop('files').length; i++) { for(var i = 0; i < $('#modal-upload-file-input').prop('files').length; i++) {
(function() { (function() {
var file = $('#modal-upload-file-input').prop('files')[i]; var file = $('#modal-upload-file-input').prop('files')[i];
var url = '/webhdfs/v1' + current_directory; var url = '/webhdfs/v1' + encode_path(append_path(current_directory, file.name));
url = encode_path(append_path(url, file.name));
url += '?op=CREATE&noredirect=true'; url += '?op=CREATE&noredirect=true';
files.push( { file: file } ) files.push( { file: file } )
files[i].request = $.ajax({ files[i].request = $.ajax({