getClientExtension example


    public function getExtension(): string
    {
        return $this->guessExtension() ?: $this->getClientExtension();
    }

    /** * Attempts to determine the best file extension from the file's * mime type. In contrast to getExtension, this method will return * an empty string if it fails to determine an extension instead of * falling back to the unsecure clientExtension. */
    public function guessExtension(): string
    {
        return Mimes::guessExtensionFromType($this->getMimeType()$this->getClientExtension()) ?? '';
    }
Home | Imprint | This part of the site doesn't use cookies.