private function getSubFolder(UploadedFile $uploadedFile)
    {
        // Find mime type
        $mimeType = $uploadedFile->getMimeType();

        // Clean mime-type for charset
        // and other useless stuff
        if (strpos($mimeType, ';')) {
            $mimeType = explode(';', $mimeType);

            return strtolower($mimeType[0]);
        }

        // Force mime-type to lowercase
        $mimeType = strtolower($mimeType);

        // Split mime-type into type and extension
        $mimeType = explode('/', $mimeType);

        return ($mimeType[0] == 'image') ? 'images/original' : 'data';
    }
private function getSubFolder(UploadedFile $uploadedFile)
    {
        // Find mime type
        $mimeType = $uploadedFile->getMimeType();

        // Clean mime-type for charset
        // and other useless stuff
        if (strpos($mimeType, ';')) {
            $mimeType = explode(';', $mimeType);

            return strtolower($mimeType[0]);
        }

        // Force mime-type to lowercase
        $mimeType = strtolower($mimeType);

        // Split mime-type into type and extension
        $mimeType = explode('/', $mimeType);

        return ($mimeType[0] == 'image') ? 'images/original' : 'data';
    }
private function getSubFolder ( UploadedFile $ uploadedFile ) { // Find mime type $ mimeType = $ uploadedFile -> getMimeType ( ) ; // Clean mime-type for charset // and other useless stuff if ( strpos ( $ mimeType , ';' ) ) { $ mimeType = explode ( ';' , $ mimeType ) ; return strtolower ( $ mimeType [ 0 ] ) ; } // Force mime-type to lowercase $ mimeType = strtolower ( $ mimeType ) ; // Split mime-type into type and extension $ mimeType = explode ( '/' , $ mimeType ) ; return ( $ mimeType [ 0 ] == 'image' ) ? 'images/original' : 'data' ; }
Retrieve sub folder.

@author Casper Rasmussen <cr@nodes.dk>

@param  \Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile

@return string
Retrieve sub folder .