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

fix: Client sends incorrect file name when uploading assets #32636

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Jun 19, 2024

Proposed changes (including videos or screenshots)

  • This issue was causing the following end-to-end test case to fail: settings-assets.spec.ts:19:6 › settings-assets › expect upload and delete logo asset and label should be visible ;

Since the client used to incorrectly send the asset type as the filename, we couldn't succesfully extract the MIME type from the uploaded file. That is, when uploading a jpeg file as a logo asset, the client would use logo as the filename, which is mapped to the default application/octet-stream MIME type (that is not accepted for assets, so it throws an error).

Issue(s)

CORE-515

Steps to test or reproduce

Further comments

This error started happening after the changes in #32471

Copy link
Contributor

dionisio-bot bot commented Jun 19, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jun 19, 2024

🦋 Changeset detected

Latest commit: 4af2c19

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matheusbsilva137 matheusbsilva137 changed the title chore: Client sends incorrect file name when uploading assets fix: Client sends incorrect file name when uploading assets Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.85%. Comparing base (70e3968) to head (1a45eaf).
Report is 3 commits behind head on develop.

Current head 1a45eaf differs from pull request most recent head 4af2c19

Please upload reports for the commit 4af2c19 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32636      +/-   ##
===========================================
+ Coverage    55.06%   55.85%   +0.78%     
===========================================
  Files         2397     2421      +24     
  Lines        53207    53589     +382     
  Branches     10946    11022      +76     
===========================================
+ Hits         29301    29932     +631     
+ Misses       21318    21030     -288     
- Partials      2588     2627      +39     
Flag Coverage Δ
e2e 54.90% <100.00%> (+1.52%) ⬆️
unit 72.12% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@matheusbsilva137 matheusbsilva137 added this to the 6.10 milestone Jun 19, 2024
@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review June 19, 2024 20:27
@matheusbsilva137 matheusbsilva137 requested a review from a team as a code owner June 19, 2024 20:27
@ggazzo ggazzo merged commit f5e0d1e into develop Jun 19, 2024
12 of 13 checks passed
@ggazzo ggazzo deleted the chore/assets-incorrect-filename branch June 19, 2024 20:31
This was referenced Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants