Merge branch 'release/rc-v1.2.0' of github.com:ONLYOFFICE/DocSpace into release/rc-v1.2.0
This commit is contained in:
commit
2fa537a950
@ -108,11 +108,9 @@ public class EmployeeDtoHelper
|
||||
result.Title = userInfo.Title;
|
||||
}
|
||||
|
||||
// var userInfoLM = userInfo.LastModified.GetHashCode();
|
||||
|
||||
if (_httpContext.Check("avatarSmall"))
|
||||
{
|
||||
result.AvatarSmall = (await _userPhotoManager.GetSmallPhotoURL(userInfo.Id));// + $"?_={userInfoLM}";
|
||||
result.AvatarSmall = (await _userPhotoManager.GetSmallPhotoURL(userInfo.Id));
|
||||
}
|
||||
|
||||
if (result.Id != Guid.Empty)
|
||||
|
@ -239,21 +239,19 @@ public class EmployeeFullDtoHelper : EmployeeDtoHelper
|
||||
FillConacts(result, userInfo);
|
||||
FillGroups(result, userInfo);
|
||||
|
||||
// var userInfoLM = userInfo.LastModified.GetHashCode();
|
||||
|
||||
if (_context.Check("avatarMax"))
|
||||
{
|
||||
result.AvatarMax = await _userPhotoManager.GetMaxPhotoURL(userInfo.Id);// + $"?_={userInfoLM}";
|
||||
result.AvatarMax = await _userPhotoManager.GetMaxPhotoURL(userInfo.Id);
|
||||
}
|
||||
|
||||
if (_context.Check("avatarMedium"))
|
||||
{
|
||||
result.AvatarMedium = await _userPhotoManager.GetMediumPhotoURL(userInfo.Id);// + $"?_={userInfoLM}";
|
||||
result.AvatarMedium = await _userPhotoManager.GetMediumPhotoURL(userInfo.Id);
|
||||
}
|
||||
|
||||
if (_context.Check("avatar"))
|
||||
{
|
||||
result.Avatar = await _userPhotoManager.GetBigPhotoURL(userInfo.Id);// + $"?_={userInfoLM}";
|
||||
result.Avatar = await _userPhotoManager.GetBigPhotoURL(userInfo.Id);
|
||||
}
|
||||
|
||||
if (_context.Check("listAdminModules"))
|
||||
|
@ -99,10 +99,10 @@ public class StorageHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(context.Request.Query["_"]))
|
||||
{
|
||||
context.Response.Headers["Cache-Control"] = "public, max-age=31536000";
|
||||
}
|
||||
//if (!String.IsNullOrEmpty(context.Request.Query["v"]))
|
||||
//{
|
||||
// context.Response.Headers["Cache-Control"] = "public, max-age=31536000";
|
||||
//}
|
||||
|
||||
var etag = await storage.GetFileEtagAsync(_domain, path);
|
||||
|
||||
|
@ -24,7 +24,7 @@ map $request_uri $header_x_frame_options {
|
||||
|
||||
map $request_uri $cache_control {
|
||||
default "no-cache, no-store, must-revalidate";
|
||||
~*\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "private";
|
||||
~*\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "public, max-age=3153600";
|
||||
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md) "no-cache, no-store, must-revalidate";
|
||||
~*\/(locales.*\.json) "public, no-transform";
|
||||
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "public, no-transform, max-age=0, s-maxage=3153600";
|
||||
|
@ -281,9 +281,11 @@ public class RoomLogoManager
|
||||
private async ValueTask<string> GetLogoPathAsync<T>(T id, SizeName size)
|
||||
{
|
||||
var fileName = string.Format(LogosPath, ProcessFolderId(id), size.ToStringLowerFast());
|
||||
var etag = await DataStore.GetFileEtagAsync(string.Empty, fileName);
|
||||
var uri = await DataStore.GetUriAsync(fileName);
|
||||
var version = etag.Replace("\"", "");
|
||||
|
||||
return uri.ToString();
|
||||
return uri.ToString() + $"?v={version}";
|
||||
}
|
||||
|
||||
private async Task<byte[]> GetTempAsync(string fileName)
|
||||
|
@ -457,7 +457,13 @@ public class UserPhotoManager
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
var store = GetDataStore();
|
||||
return (await store.GetUriAsync(fileName)).ToString();
|
||||
|
||||
var uri = await store.GetUriAsync(fileName);
|
||||
|
||||
var etag = await store.GetFileEtagAsync(string.Empty, fileName);
|
||||
var version = etag.Replace("\"", "");
|
||||
|
||||
return uri.ToString() + $"?v={version}";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user