Upgrade to 4.4.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// routing pattern to match all models with files
|
||||
$filePattern = '(account/|pages/[^/]+/|site/|users/[^/]+/|)files/(:any)';
|
||||
$filePattern = '(account/|pages/[^/]+/|site/|users/[^/]+/|)files/(:any)';
|
||||
$parentPattern = '(account|pages/[^/]+|site|users/[^/]+)/files';
|
||||
|
||||
/**
|
||||
@@ -47,17 +47,15 @@ return [
|
||||
// move_uploaded_file() not working with unit test
|
||||
// @codeCoverageIgnoreStart
|
||||
return $this->upload(function ($source, $filename) use ($path) {
|
||||
$props = [
|
||||
// move the source file from the temp dir
|
||||
return $this->parent($path)->createFile([
|
||||
'content' => [
|
||||
'sort' => $this->requestBody('sort')
|
||||
],
|
||||
'source' => $source,
|
||||
'template' => $this->requestBody('template'),
|
||||
'filename' => $filename
|
||||
];
|
||||
|
||||
// move the source file from the temp dir
|
||||
return $this->parent($path)->createFile($props, true);
|
||||
], true);
|
||||
});
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
Reference in New Issue
Block a user