Skip to content

Commit

Permalink
Add mimetype to creators
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Nov 26, 2019
1 parent 2319ac4 commit 75267c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/files/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ private function getDirectEditingCapabilitites(): array {
'id' => $id,
'name' => $creator->getName(),
'extension' => $creator->getExtension(),
'templates' => false
'templates' => $creator instanceof ACreateFromTemplate,
'mimetype' => $creator->getMimetype()
];
if ($creator instanceof ACreateFromTemplate) {
$capabilities['creators'][$id]['templates'] = true;
}

}
}
return $capabilities;
Expand Down
8 changes: 8 additions & 0 deletions lib/public/DirectEditing/ACreateEmpty.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ abstract public function getName(): string;
*/
abstract public function getExtension(): string;

/**
* Mimetype of the resulting created file
*
* @since 18.0.0
* @return string
*/
abstract public function getMimetype(): string;

/**
* Add content when creating empty files
*
Expand Down

0 comments on commit 75267c3

Please sign in to comment.