in azure-storage-server/src/main/kotlin/jetbrains/buildServer/serverSide/artifacts/azure/web/AzureArtifactDownloadProcessor.kt [29:43]
override fun processDownload(artifactInfo: StoredBuildArtifactInfo,
buildPromotion: BuildPromotion,
request: HttpServletRequest,
response: HttpServletResponse): Boolean {
val artifactData = artifactInfo.artifactData ?: throw IOException("Can not process artifact download request for a folder")
val params = AzureUtils.getParameters(artifactInfo.storageSettings)
val path = AzureUtils.getArtifactPath(artifactInfo.commonProperties, artifactData.path)
val temporaryUrl = getTemporaryUrl(path, params, urlLifeTime)
response.setHeader(HttpHeaders.CACHE_CONTROL, "max-age=" + httpCacheMaxAge)
response.sendRedirect(temporaryUrl)
return true
}