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

[BUG] BUG in split upload of openim-web-front and openim-admin-front files #2899

Open
Feiyizhan opened this issue Nov 28, 2024 · 6 comments
Open
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@Feiyizhan
Copy link

OpenIM Server Version

3.8.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

当服务端切换为OSS存储时,对于文件大小小于单个分片尺寸的文件,会出现无法上传的BUG。

失败案例

初始化上传请求

请求参数

image

响应结果

image

上传文件请求

image

image

成功案例

初始化上传请求

请求参数

image

响应结果

image

上传文件请求

请求参数

请求1

image
image

请求2

image
image

查询上传结果

请求参数

image
image

响应结果

image

这个问题在客户端demo中是没问题的,就是官方的这两web端有问题

我估计是对于非分片的请求前端处理不正确的

Screenshots Link

No response

@Feiyizhan Feiyizhan added the bug Categorizes issue or PR as related to a bug. label Nov 28, 2024
@OpenIM-Robot OpenIM-Robot changed the title [BUG] openim-web-front 和 openim-admin-front 文件分片上传的BUG [BUG] BUG in split upload of openim-web-front and openim-admin-front files Nov 28, 2024
@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

@Feiyizhan
Copy link
Author

原因找到了,客户端上传的时候多加了一个请求头content-type: image/jpeg, 只要去掉这个请求头就可以

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The reason was found. The client added an extra request header content-type:' when uploading. image/jpeg, just remove this request header

@Feiyizhan
Copy link
Author

使用ModHeader 扩展,验证可行。

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Verification works using the ModHeader extension.

@lgz5689
Copy link
Member

lgz5689 commented Dec 2, 2024

Whether your upload is of the image/jpeg type ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants