mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-03 19:28:40 +00:00
add todos from github
This commit is contained in:
parent
367f5801ea
commit
628a3bbfd0
|
|
@ -20,9 +20,9 @@ use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Media\Models\PermissionState;
|
use Modules\Media\Models\PermissionState;
|
||||||
use Modules\Media\Models\UploadFile;
|
use Modules\Media\Models\UploadFile;
|
||||||
use Modules\Media\Models\UploadStatus;
|
use Modules\Media\Models\UploadStatus;
|
||||||
|
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Message\NotificationLevel;
|
use phpOMS\Message\NotificationLevel;
|
||||||
|
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\System\MimeType;
|
use phpOMS\System\MimeType;
|
||||||
|
|
@ -34,6 +34,25 @@ use phpOMS\System\MimeType;
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#50
|
||||||
|
* Allow collection modification
|
||||||
|
* Allow to change (add/remove) collection components.
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#59
|
||||||
|
* Implement resumable uploads
|
||||||
|
* This is especially useful if someone wants to upload when he/she has wifi access
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#139
|
||||||
|
* Allow text file modification directly in the media module
|
||||||
|
* For text files there should be a edit button which replaces the display with a textarea which can be saved.
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#150
|
||||||
|
* Allow to create new files (not only upload)
|
||||||
|
* In many cases it would be nice to create a new file manually with the module (e.g. create a new .txt or .sqlite file) which then can get edited directly in the media module.
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#160
|
||||||
|
* Fix media upload
|
||||||
*/
|
*/
|
||||||
final class ApiController extends Controller
|
final class ApiController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@ use phpOMS\Views\View;
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
*
|
||||||
|
* @todo Orange-Management/Modules#150
|
||||||
|
* Allow to create new files (not only upload)
|
||||||
|
* In many cases it would be nice to create a new file manually with the module (e.g. create a new .txt or .sqlite file) which then can get edited directly in the media module.
|
||||||
*/
|
*/
|
||||||
final class BackendController extends Controller
|
final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.4
|
|
||||||
*
|
|
||||||
* @package Modules\Media\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link https://orange-management.org
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
// TODO: implement file storage interface
|
|
||||||
|
|
@ -168,7 +168,12 @@ class Media implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function encrypt(string $password, string $outputPath = null) : void
|
public function encrypt(string $password, string $outputPath = null) : void
|
||||||
{
|
{
|
||||||
// todo: implement;
|
/**
|
||||||
|
* @todo Orange-Management/Modules#185
|
||||||
|
* Sometimes it's important to protect sensitive information. Therefore an encryption for media files becomes necessary.
|
||||||
|
* The media module should allow to define a password (not encrypted on the hard drive)
|
||||||
|
* and an encryption checkbox which forces a password AND encrypts the file on the harddrive.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -183,7 +188,12 @@ class Media implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function decrypt(string $password, string $outputPath) : string
|
public function decrypt(string $password, string $outputPath) : string
|
||||||
{
|
{
|
||||||
// todo: implement;
|
/**
|
||||||
|
* @todo Orange-Management/Modules#185
|
||||||
|
* Sometimes it's important to protect sensitive information. Therefore an encryption for media files becomes necessary.
|
||||||
|
* The media module should allow to define a password (not encrypted on the hard drive)
|
||||||
|
* and an encryption checkbox which forces a password AND encrypts the file on the harddrive.
|
||||||
|
*/
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,16 +32,15 @@ class MediaMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @todo: maybe add file name for searching by file name (path in media_file should not matter for search)
|
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
'media_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'],
|
'media_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
||||||
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true],
|
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true],
|
||||||
'media_description_raw' => ['name' => 'media_description_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
'media_description_raw' => ['name' => 'media_description_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'versioned'],
|
'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'versioned'],
|
||||||
'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path', 'autocomplete' => true],
|
'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path', 'autocomplete' => true],
|
||||||
'media_virtual' => ['name' => 'media_virtual', 'type' => 'string', 'internal' => 'virtualPath', 'autocomplete' => true],
|
'media_virtual' => ['name' => 'media_virtual', 'type' => 'string', 'internal' => 'virtualPath', 'autocomplete' => true],
|
||||||
'media_absolute' => ['name' => 'media_absolute', 'type' => 'bool', 'internal' => 'isAbsolute'],
|
'media_absolute' => ['name' => 'media_absolute', 'type' => 'bool', 'internal' => 'isAbsolute'],
|
||||||
'media_nonce' => ['name' => 'media_nonce', 'type' => 'string', 'internal' => 'nonce'],
|
'media_nonce' => ['name' => 'media_nonce', 'type' => 'string', 'internal' => 'nonce'],
|
||||||
'media_password' => ['name' => 'media_password', 'type' => 'string', 'internal' => 'password'],
|
'media_password' => ['name' => 'media_password', 'type' => 'string', 'internal' => 'password'],
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,6 @@ class UploadFile
|
||||||
{
|
{
|
||||||
switch ($error) {
|
switch ($error) {
|
||||||
case \UPLOAD_ERR_NO_FILE:
|
case \UPLOAD_ERR_NO_FILE:
|
||||||
// TODO: no file sent
|
|
||||||
return UploadStatus::NOTHING_UPLOADED;
|
return UploadStatus::NOTHING_UPLOADED;
|
||||||
case \UPLOAD_ERR_INI_SIZE:
|
case \UPLOAD_ERR_INI_SIZE:
|
||||||
case \UPLOAD_ERR_FORM_SIZE:
|
case \UPLOAD_ERR_FORM_SIZE:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
<!--
|
||||||
|
@todo Orange-Management/Modules#58
|
||||||
|
Implement drag/drop upload
|
||||||
|
-->
|
||||||
<section class="box wf-100">
|
<section class="box wf-100">
|
||||||
<header><h1><?= $this->getHtml('Media') ?></h1></header>
|
<header><h1><?= $this->getHtml('Media') ?></h1></header>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,13 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @todo Orange-Management/Modules#58
|
||||||
|
* Implement drag/drop upload
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \phpOMS\Views\View $this
|
||||||
|
*/
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user