aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-11-28 15:24:57 +0100
committerJoas Schilling <coding@schilljs.com>2019-12-10 09:10:32 +0100
commitb92ebb928a82df37ee0483861bdc4dbdcb38f816 (patch)
tree333d4298f9acf9a5f31356ae08a6b5abe8c8c10e /lib/public
parentb78a141b0b003f6de04f16863e0fb67f28658dab (diff)
downloadnextcloud-server-b92ebb928a82df37ee0483861bdc4dbdcb38f816.tar.gz
nextcloud-server-b92ebb928a82df37ee0483861bdc4dbdcb38f816.zip
Allow to check for the mimetype by content only
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/IMimeTypeDetector.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php
index 3d26860c744..3686405b529 100644
--- a/lib/public/Files/IMimeTypeDetector.php
+++ b/lib/public/Files/IMimeTypeDetector.php
@@ -40,10 +40,18 @@ interface IMimeTypeDetector {
* @param string $path
* @return string
* @since 8.2.0
- **/
+ */
public function detectPath($path);
/**
+ * detect mimetype only based on the content of file
+ * @param string $path
+ * @return string
+ * @since 18.0.0
+ */
+ public function detectContent(string $path): string;
+
+ /**
* detect mimetype based on both filename and content
*
* @param string $path