protected function getLocalTempFilePath($fileName)
    {
        $fileName = md5($fileName.uniqid().microtime());

        $mediaFolder = Config::get('cms.storage.media.folder', 'media');

        $path = temp_path() . MediaLibrary::validatePath($mediaFolder, true);

        if (!File::isDirectory($path)) {
            File::makeDirectory($path, 0777, true, true);
        }

        return $path.'/'.$fileName;
    }