private string GetUploadDirectory(string tenant)
{
string uploadDirectory = HostingEnvironment.MapPath($"~/Tenants/{tenant}/Temp/");
if (uploadDirectory == null || !Directory.Exists(uploadDirectory))
{
Log.Warning("Could not upload theme because the temporary directory {uploadDirectory} does not exist.",
uploadDirectory);
throw new ThemeUploadException(
"Could not upload your theme. Check application logs for more information.");
}
return uploadDirectory;
;
}