Commit 8cba97bb authored by azcomi's avatar azcomi Committed by jungle

Issue #3015274 by azcomi, jungle: Issue with filenames beginning with a non-US-ASCII character

parent 9861c56c
......@@ -65,10 +65,12 @@ class UploadController extends ControllerBase {
// @todo: Implement file_validate_size();
try {
/* @var \Drupal\Core\File\FileSystem $file_system */
$file_system = \Drupal::service('file_system');
// Return JSON-RPC response.
return new AjaxResponse([
'jsonrpc' => '2.0',
'result' => basename($this->uploadHandler->handleUpload($file)),
'result' => $file_system->basename($this->uploadHandler->handleUpload($file)),
'id' => 'id',
]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment