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 (bbb-web): improvements on presentations upload #15990

Merged

Conversation

GuiLeme
Copy link
Collaborator

@GuiLeme GuiLeme commented Nov 11, 2022

What does this PR do?

It fixes 3 things in total:

  • Integration of insertDocument with presentation-uploader toast notification;
  • Wrongly handled error within this endpoint;
  • Validation of mime type for insertDocument endpoint and deletion of mistaken files.

@GuiLeme GuiLeme changed the base branch from develop to v2.6.x-release November 11, 2022 13:32
@gustavotrott gustavotrott self-requested a review November 11, 2022 13:41
@MaximKhlobystov MaximKhlobystov added this to the Release 2.6 milestone Nov 11, 2022
}
}

def detectMimeType(File pres) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid placing this kind of function in the Controller... I think it fits better in the class SupportedFileTypes in bbb-common-web.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also try to use the Java methods to get the mime type.


public final class Util {

private static Logger log = LoggerFactory.getLogger(DocumentConversionServiceImp.class);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private static Logger log = LoggerFactory.getLogger(DocumentConversionServiceImp.class);
private static Logger log = LoggerFactory.getLogger(Util.class);

@gustavotrott gustavotrott changed the title (fix) - Fix issues and integrations with insert document endpoint fix (bbb-web): improvements on insertDocument endpoint Nov 21, 2022
@gustavotrott
Copy link
Collaborator

gustavotrott commented Nov 25, 2022

I'm not able to send .ppt files:

image

The mime identified for the file is application/vnd.openxmlformats-officedocument.presentationml.presentation.
It is weird because this mime was supposed to be used for .pptx, maybe these days ppt and pptx are using the same mime, not sure.

@gustavotrott
Copy link
Collaborator

When I receive an error I can't send new files!

cant-upload-pres-after-error.mp4

@sonarcloud
Copy link

sonarcloud bot commented Nov 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@gustavotrott gustavotrott changed the title fix (bbb-web): improvements on insertDocument endpoint fix (bbb-web): improvements on presentations upload Nov 25, 2022
Copy link
Collaborator

@gustavotrott gustavotrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gustavotrott gustavotrott merged commit 520b31a into bigbluebutton:v2.6.x-release Nov 25, 2022
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.

None yet

3 participants