mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-79617_master' of https://github.com/marxjohnson/moodle
This commit is contained in:
commit
2a82f72385
@ -495,6 +495,8 @@ class dndupload_ajax_processor {
|
||||
throw new moodle_exception('errornouploadrepo', 'moodle');
|
||||
}
|
||||
$repo = reset($repo); // Get the first (and only) upload repo.
|
||||
// Pre-emptively purge the navigation cache so the upload repo can close the session.
|
||||
navigation_cache::destroy_volatile_caches();
|
||||
$details = $repo->process_upload(null, $maxbytes, $types, '/', $draftitemid);
|
||||
if (empty($this->displayname)) {
|
||||
$this->displayname = $this->display_name_from_file($details['file']);
|
||||
|
@ -82,6 +82,8 @@ class repository_upload extends repository {
|
||||
$license = null, $author = '', $overwriteexisting = false, $areamaxbytes = FILE_AREA_MAX_BYTES_UNLIMITED) {
|
||||
global $USER, $CFG;
|
||||
|
||||
\core\session\manager::write_close();
|
||||
|
||||
if ((is_array($types) and in_array('*', $types)) or $types == '*') {
|
||||
$this->mimetypes = '*';
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user