Skip to content

Commit

Permalink
Fix [UI] Artifacts Fail showing html files when stored as "s3" 1.7.x (
Browse files Browse the repository at this point in the history
  • Loading branch information
Taras-Hlukhovetskyi authored Jan 7, 2025
1 parent b3108d1 commit 82b39c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/common/Download/DownloadItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ const DownloadItem = ({ downloadItem }) => {
response = await api.getArtifactPreview(downloadItem.projectName, config)

if (response?.data) {
fullFile = new Blob([fullFile, response.data], { type: response.data.type })
fullFile = new Blob([fullFile, response.data])
} else {
throw new Error('Error during loading the file')
}

config.params.offset += chunkSize
config.params.offset += response.data.byteLength ?? chunkSize
}

response.data = fullFile
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getArtifactPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export const fetchArtifactPreview = async (
throw new Error('Error during loading the preview file')
}

config.params.offset += chunkSize
config.params.offset += response.data.size ?? chunkSize
}

response.data = fullFile
Expand Down

0 comments on commit 82b39c1

Please sign in to comment.