diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-26 15:07:30 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-12-02 14:28:31 +0300 |
commit | 9d645c80108a79d15dd3ef276b9e0d9f154f00fd (patch) | |
tree | 309aa60ddafde93961c24c37c754f979095e3b98 /lib | |
parent | 1e5f5e3ff0e8c1670819fe70a2e1b84a9ceb4d4a (diff) |
Add mimetype to creators
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DirectEditing/TextDocumentCreator.php | 4 | ||||
-rw-r--r-- | lib/DirectEditing/TextDocumentTemplateCreator.php | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/DirectEditing/TextDocumentCreator.php b/lib/DirectEditing/TextDocumentCreator.php index 6b78cefb4..2fa1b5472 100644 --- a/lib/DirectEditing/TextDocumentCreator.php +++ b/lib/DirectEditing/TextDocumentCreator.php @@ -51,6 +51,10 @@ class TextDocumentCreator extends ACreateEmpty { return '.md'; } + public function getMimetype(): string { + return 'text/markdown'; + } + public function create(File $file, string $creatorId = null, string $templateId = null): void { parent::create($file, $creatorId, $templateId); // TODO: Change the autogenerated stub diff --git a/lib/DirectEditing/TextDocumentTemplateCreator.php b/lib/DirectEditing/TextDocumentTemplateCreator.php index d7732573c..6e5668bb7 100644 --- a/lib/DirectEditing/TextDocumentTemplateCreator.php +++ b/lib/DirectEditing/TextDocumentTemplateCreator.php @@ -70,6 +70,10 @@ class TextDocumentTemplateCreator extends ACreateFromTemplate { return self::TEMPLATES; } + public function getMimetype(): string { + return 'text/markdown'; + } + public function create(File $file, string $creatorId = null, string $templateId = null): void { $template = self::TEMPLATES[$templateId]; $file->putContent('## ' . $template['name'] . '\n\n' . 'Created from a template with Nextcloud text'); |