Skip to content

Commit

Permalink
fix:下载笔记本和下载笔记本里面的文件,不走统一编码,由后端编码
Browse files Browse the repository at this point in the history
  • Loading branch information
luoluoTH committed Jan 7, 2025
1 parent e98ebdf commit 68888a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/main/handlers/utils/requestWithProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function encodeChineseCharacters(url) {

let writer = null
let downloadedLength = 0
// 目前只有笔记本中的上传的文件,下载不需要额外的编码(因为这个地方只需要编码文件名字,后端编好了)
// 目前只有笔记本中的上传的文件和下载笔记本不需要额外的编码(因为这个地方可能会出现特殊字符,例如文件名:15w+)
function requestWithProgress(downloadUrl, dest, options = {}, onProgress = undefined, onFinished = undefined, onError = undefined, isEncodeURI = true) {
// 设置axios请求配置
const config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ const ModifyNotepad: React.FC<ModifyNotepadProps> = React.memo((props) => {
onOpenLocalFileByPath(res?.path)
m.destroy()
}}
isEncodeURI={false}
/>
),
bodyStyle: {padding: 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ const NotepadManage: React.FC<NotepadManageProps> = React.memo((props) => {
onSuccess={onSuccessDownload}
visible={!!batchDownInfo.url}
setVisible={onCancelDownload}
isEncodeURI={false}
/>
)}
</div>
Expand Down

0 comments on commit 68888a0

Please sign in to comment.