Skip to content

Commit

Permalink
feat: 文件在线预览支持更多的文件类型 #2765
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 committed Jan 6, 2025
1 parent 6f1adc8 commit e95a577
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/frontend/devops-repository/src/utils/previewOfficeFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function getPreviewLocalOfficeFileInfo (projectId, repoName, fullPath) {
return axios({
url: `${location.origin}/web/preview/api/file/getPreviewInfo/` + url,
method: 'get',
// 注意,此处需要设置下载的文件的返回类型为二进制,即 blob
withCredentials: true,
xsrfCookieName: (MODE_CONFIG === 'ci' || MODE_CONFIG === 'saas') ? 'bk_token' : 'bkrepo_ticket', // 注入csrfToken
xsrfHeaderName: 'X-CSRFToken' // 注入csrfToken
Expand All @@ -32,7 +31,6 @@ export function getPreviewRemoteOfficeFileInfo(extraParam) {
params: {
extraParam: extraParam
},
// 注意,此处需要设置下载的文件的返回类型为二进制,即 blob
withCredentials: true,
xsrfCookieName: (MODE_CONFIG === 'ci' || MODE_CONFIG === 'saas') ? 'bk_token' : 'bkrepo_ticket', // 注入csrfToken
xsrfHeaderName: 'X-CSRFToken' // 注入csrfToken
Expand Down

0 comments on commit e95a577

Please sign in to comment.