2017 © Pedro Peláez
 

library file-detector

MIME type detector for partial file streams of unlimited length

image

ancarda/file-detector

MIME type detector for partial file streams of unlimited length

  • Wednesday, July 18, 2018
  • by ancarda
  • Repository
  • 2 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ancarda/file-detector

MIME type detector for partial file streams of unlimited length, (*1)

Latest Stable Version Total Downloads License Build Status Coverage Status, (*2)

file-detector is a library for PHP 7.0+ that accepts a file stream of any length, even if it's a partial file type, and provides a MIME detector for it., (*3)

The detector class can be used with any framework and has no dependencies. This library may be installed via composer with the following command:, (*4)

composer require ancarda/file-detector

The detector can then be initalized and used, like so. For example:, (*5)

<?php

$resource = fopen('example.jpg', 'r');
$detector = new \Ancarda\File\Detector;
$mimetype = $detector->determineMimeType($resource);

//$mimetype is now 'image/jpg'

The Versions

18/07 2018

dev-master

9999999-dev

MIME type detector for partial file streams of unlimited length

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires