Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

进入文章编辑页面提示 Invalid type of parameter 'file'. #5430

Closed
ruibaby opened this issue Mar 2, 2024 · 0 comments · Fixed by #5434
Closed

进入文章编辑页面提示 Invalid type of parameter 'file'. #5430

ruibaby opened this issue Mar 2, 2024 · 0 comments · Fixed by #5434
Labels
area/editor Issues or PRs related to the Editor area/ui Issues or PRs related to the Halo UI kind/bug Categorizes issue or PR as related to a bug.

Comments

@ruibaby
Copy link
Member

ruibaby commented Mar 2, 2024

系统信息

使用的哪种方式运行?

Docker Compose

发生了什么?

image

/kind bug
/area ui
/area editor

相关日志输出

浏览器控制台日志:


vue.global.91bf952d.js:6 TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.
    at DefaultEditor-58cfe010.js:1:9730
    at new Promise (<anonymous>)
    at Wr (DefaultEditor-58cfe010.js:1:9624)
    at u (DefaultEditor-58cfe010.js:1:11879)
    at jt (vue.global.91bf952d.js:6:15988)
    at Ht (vue.global.91bf952d.js:6:16058)
    at un (vue.global.91bf952d.js:6:18032)
    at p (DefaultEditor-58cfe010.js:1:2775)
    at hr.immediate (DefaultEditor-58cfe010.js:1:3361)
    at jt (vue.global.91bf952d.js:6:15988)


### 附加信息

_No response_
@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/ui Issues or PRs related to the Halo UI area/editor Issues or PRs related to the Editor labels Mar 2, 2024
f2c-ci-robot bot pushed a commit that referenced this issue Mar 5, 2024
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

#### What this PR does / why we need it:

使用默认编辑器时,当图片、视频中具有 `file` 属性时,进入编辑界面时会报错。此 PR 将不再从渲染后的 HTML 中获取 file 属性,并且在渲染 HTML 时,抛弃掉 file 属性用于解决这个问题。

#### How to test it?

测试图片上传、视频上传功能不受影响即可。

#### Which issue(s) this PR fixes:

Fixes #5430 

#### Does this PR introduce a user-facing change?
```release-note
修复进入文章页面会偶现错误提示的问题
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor Issues or PRs related to the Editor area/ui Issues or PRs related to the Halo UI kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant