Fixed cutting names in upload popup (dependence of viewType)