1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

FolderId is not ready yet

This commit is contained in:
eldadfux 2019-11-17 00:48:32 +02:00
parent 4cd5837e7a
commit 82209da6c7
2 changed files with 4 additions and 4 deletions

View file

@ -951,9 +951,9 @@ $collections = [
'$collection' => Database::SYSTEM_COLLECTION_RULES,
'label' => 'Folder ID',
'key' => 'folderId',
'type' => 'numeric',
'type' => 'key',
'default' => 0,
'required' => true,
'required' => false,
'array' => false,
],
[

View file

@ -403,9 +403,9 @@ $utopia->post('/v1/storage/files')
->param('files', [], function () { return new File(); }, 'Binary Files.', false)
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
->param('folderId', '', function () { return new UID(); }, 'Folder to associate files with.', true)
// ->param('folderId', '', function () { return new UID(); }, 'Folder to associate files with.', true)
->action(
function ($files, $read, $write, $folderId) use ($request, $response, $user, $projectDB, $audit, $usage) {
function ($files, $read, $write, $folderId = '') use ($request, $response, $user, $projectDB, $audit, $usage) {
$files = $request->getFiles('files');
$read = (empty($read)) ? ['user:'.$user->getUid()] : $read;
$write = (empty($write)) ? ['user:'.$user->getUid()] : $write;