public static function uploadUrl($path = '', $uploadsAlias = '@uploads', $webfilesurlAlias = 'uploads')
    {
        $path = str_replace('\\', '/', $path);
        $webroot = str_replace('\\', '/', Yii::getAlias('@webroot'));
        $uploads = str_replace('\\', '/', Yii::getAlias($uploadsAlias));

        //$subdir = str_replace($webroot, '', $uploads); // work correct only if uploads path is insite web root
        $subdir = str_replace($uploads, '', $path);

        $web = Yii::getAlias('@web'); 
        $files = Yii::getAlias($webfilesurlAlias);
        $result = $web . (empty($web) ? '' : '/' ) . $files . $subdir;

        return $result;
    }