mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
"MDL-23268, remove file_browser, urldecode, clean filename, fixed fie overriding issue"
This commit is contained in:
parent
6c5b99d9f7
commit
64654e78b6
2 changed files with 21 additions and 7 deletions
|
@ -109,6 +109,22 @@ M.core_filepicker.init = function(Y, options) {
|
|||
params[i] = args['params'][i];
|
||||
}
|
||||
}
|
||||
if (args.action == 'upload') {
|
||||
var list = [];
|
||||
for(var k in params) {
|
||||
var value = params[k];
|
||||
if(value instanceof Array) {
|
||||
for(var i in value) {
|
||||
list.push(k+'[]='+value[i]);
|
||||
}
|
||||
} else {
|
||||
list.push(k+'='+value);
|
||||
}
|
||||
}
|
||||
params = list.join('&');
|
||||
} else {
|
||||
params = build_querystring(params);
|
||||
}
|
||||
var cfg = {
|
||||
method: 'POST',
|
||||
on: {
|
||||
|
@ -145,7 +161,7 @@ M.core_filepicker.init = function(Y, options) {
|
|||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
},
|
||||
data: build_querystring(params),
|
||||
data: params,
|
||||
context: this
|
||||
};
|
||||
if (args.form) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue