mirror of
https://codeberg.org/SeedDMS/paperless
synced 2024-11-26 07:22:08 +00:00
add upload folder
This commit is contained in:
parent
2ed11ce519
commit
d91bae4692
|
@ -828,11 +828,17 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
|||
$fulltextservice = $this->container->fulltextservice;
|
||||
$notifier = $this->container->notifier;
|
||||
|
||||
if(isset($settings->_extensions['paperless']['uploadfolder']))
|
||||
$mfolder = $dms->getFolder($settings->_extensions['paperless']['uploadfolder']);
|
||||
|
||||
if(!$mfolder) {
|
||||
if(!empty($settings->_extensions['paperless']['usehomefolder'])) {
|
||||
if(!($mfolder = $dms->getFolder((int) $userobj->getHomeFolder())))
|
||||
$mfolder = $dms->getFolder($settings->_rootFolderID);
|
||||
} elseif(!isset($settings->_extensions['paperless']['rootfolder']) || !($mfolder = $dms->getFolder($settings->_extensions['paperless']['rootfolder'])))
|
||||
$mfolder = $dms->getFolder($settings->_rootFolderID);
|
||||
}
|
||||
|
||||
if($mfolder) {
|
||||
if($mfolder->getAccessMode($userobj) < M_READWRITE)
|
||||
return $response->withStatus(403);
|
||||
|
|
8
conf.php
8
conf.php
|
@ -9,7 +9,7 @@ $EXT_CONF['paperless'] = array(
|
|||
'config' => array(
|
||||
'rootfolder' => array(
|
||||
'title'=>'Folder used as root folder',
|
||||
'help'=>'This is the folder used as the base folder. Uploaded documents will be saved in this folder and all documents listed will result in fulltext search below this folder.',
|
||||
'help'=>'This is the folder used as the base folder. Documens not below this folder will be not shown by the papeerless mobile app. Uploaded documents will be saved into this folder, unless the dedicated upload folder is set.',
|
||||
'type'=>'select',
|
||||
'internal'=>'folders',
|
||||
),
|
||||
|
@ -18,6 +18,12 @@ $EXT_CONF['paperless'] = array(
|
|||
'type'=>'checkbox',
|
||||
'help'=>"Enable, if the user's home folder shall be used instead of the configured root folder.",
|
||||
),
|
||||
'uploadfolder' => array(
|
||||
'title'=>'Folder where new documents are uploaded',
|
||||
'help'=>'This is the folder where new documents will be uploaded by the paperless mobile app.',
|
||||
'type'=>'select',
|
||||
'internal'=>'folders',
|
||||
),
|
||||
'jwtsecret' => array(
|
||||
'title'=>'Secret for JSON Web Token',
|
||||
'help'=>'This is used for creating a token which is needed to authenticate by token',
|
||||
|
|
Loading…
Reference in New Issue
Block a user