[s3] Fix S3 expires period

This commit is contained in:
Sergey Konovalov
2021-11-21 16:58:27 +03:00
committed by Sergey Konovalov
parent 8d644d794d
commit 6a251351f7
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ exports.deleteObjects = function(strPaths) {
};
exports.getSignedUrl = function(baseUrl, strPath, urlType, optFilename, opt_creationDate) {
return new Promise(function(resolve, reject) {
var expires = (commonDefines.c_oAscUrlTypes.Session === urlType ? cfgExpSessionAbsolute : cfgStorageUrlExpires) || 31536000;
var expires = (commonDefines.c_oAscUrlTypes.Session === urlType ? cfgExpSessionAbsolute / 1000 : cfgStorageUrlExpires) || 31536000;
var userFriendlyName = optFilename ? optFilename.replace(/\//g, "%2f") : path.basename(strPath);
var contentDisposition = utils.getContentDisposition(userFriendlyName, null, null);
if (cfgUseRequestToGetUrl) {