increment copyright date to 2022, allow scheduled jobs to support weekly interval, improve dynamic image generation, add defensive logic to router

This commit is contained in:
Shaun Walker
2022-01-05 14:28:42 -05:00
parent eeff4af167
commit 6af5682548
13 changed files with 93 additions and 53 deletions

View File

@ -114,13 +114,16 @@ namespace Oqtane.Shared
public static string ImageUrl(Alias alias, int fileId, int width, int height, string mode)
{
return ImageUrl(alias, fileId, width, height, mode, 0);
return ImageUrl(alias, fileId, width, height, mode, "", "", 0, false);
}
public static string ImageUrl(Alias alias, int fileId, int width, int height, string mode, int rotate)
public static string ImageUrl(Alias alias, int fileId, int width, int height, string mode, string position, string background, int rotate, bool recreate)
{
var aliasUrl = (alias != null && !string.IsNullOrEmpty(alias.Path)) ? "/" + alias.Path : "";
return $"{aliasUrl}{Constants.ImageUrl}{fileId}/{width}/{height}/{mode}/{rotate}";
mode = string.IsNullOrEmpty(mode) ? "crop" : mode;
position = string.IsNullOrEmpty(position) ? "center" : position;
background = string.IsNullOrEmpty(background) ? "000000" : background;
return $"{aliasUrl}{Constants.ImageUrl}{fileId}/{width}/{height}/{mode}/{position}/{background}/{rotate}/{recreate}";
}
public static string TenantUrl(Alias alias, string url)