diff --git a/Common/config/default.json b/Common/config/default.json index ffed7af6..3a0b5117 100644 --- a/Common/config/default.json +++ b/Common/config/default.json @@ -30,7 +30,7 @@ "urlExpires": 604800, "accessKeyId": "AKID", "secretAccessKey": "SECRET", - "useRequestToGetUrl": false, + "useRequestToGetUrl": true, "useSignedUrl": false, "sslEnabled": false, "s3ForcePathStyle": true, diff --git a/Common/sources/storage-s3.js b/Common/sources/storage-s3.js index 17450a62..7f085def 100644 --- a/Common/sources/storage-s3.js +++ b/Common/sources/storage-s3.js @@ -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) {