mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-14 16:28:41 +00:00
improve file upload and type hinting
This commit is contained in:
parent
9d6da09ef3
commit
3593546966
|
|
@ -145,7 +145,7 @@ final class ApiController extends Controller
|
||||||
* FILE_PATH = combination of base path and virtual path
|
* FILE_PATH = combination of base path and virtual path
|
||||||
* @param bool $hasAccountRelation The uploaded files should be related to an account
|
* @param bool $hasAccountRelation The uploaded files should be related to an account
|
||||||
*
|
*
|
||||||
* @return array
|
* @return Media[]
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -256,7 +256,7 @@ final class ApiController extends Controller
|
||||||
* @param null|int $type Media type (internal categorization)
|
* @param null|int $type Media type (internal categorization)
|
||||||
* @param ApplicationAbstract $app Should create relation to uploader
|
* @param ApplicationAbstract $app Should create relation to uploader
|
||||||
*
|
*
|
||||||
* @return null|Media
|
* @return Media
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -267,10 +267,10 @@ final class ApiController extends Controller
|
||||||
int $type = null,
|
int $type = null,
|
||||||
string $ip = '127.0.0.1',
|
string $ip = '127.0.0.1',
|
||||||
ApplicationAbstract $app = null
|
ApplicationAbstract $app = null
|
||||||
) : ?Media
|
) : Media
|
||||||
{
|
{
|
||||||
if ($status['status'] !== UploadStatus::OK) {
|
if ($status['status'] !== UploadStatus::OK) {
|
||||||
return null;
|
return new NullMedia();
|
||||||
}
|
}
|
||||||
|
|
||||||
$media = new Media();
|
$media = new Media();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user