Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
wpide
/
App
/
Services
/
Storage
/
Adapters
:
DefaultFileSystem.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace WPIDE\App\Services\Storage\Adapters; use League\Flysystem\Adapter\Local; use League\MimeTypeDetection\ExtensionMimeTypeDetector; use League\MimeTypeDetection\FinfoMimeTypeDetector; class DefaultFileSystem extends Local { /** * @inheritdoc */ public function getMimetype($path) { $location = $this->applyPathPrefix($path); if(extension_loaded('fileinfo')) { $mimeDetector = new FinfoMimeTypeDetector(); }else{ $mimeDetector = new ExtensionMimeTypeDetector(); } $mimetype = $mimeDetector->detectMimeTypeFromPath($location); return ['path' => $path, 'type' => 'file', 'mimetype' => $mimetype]; } }