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

Need to split the maximum size for tipline content video files. #2048

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Sep 23, 2024

Description

We need one maximum size for the Check upload and another one that is actually the maximum size supported by WhatsApp. This separation is needed because we need to convert the uploaded video to H.264, which is the codec support by WhatsApp. So we need a safe margin for that.

Fixes: CV2-5326.

How has this been tested?

Unit test updated.

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

We need one maximum size for the Check upload and another one that is actually the maximum size supported by WhatsApp.

Fixes: CV2-5326.
Copy link
Contributor

@melsawy melsawy left a comment

Choose a reason for hiding this comment

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

Just have a suggestion to read size values from config not hard coded

def header_file_video_max_size
# Max size that WhatsApp supports
def header_file_video_max_size_whatsapp
16
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to read the value from config not hard coded

Copy link
Contributor

Choose a reason for hiding this comment

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

Seconded!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. thanks!

end

# Max size for Check (we need to convert it to H.264, so let's be safe)
def header_file_video_max_size_check
10
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to read the value from config not hard coded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. thanks!

@caiosba
Copy link
Contributor Author

caiosba commented Sep 24, 2024

Thanks guys, I turned those into configuration keys.

@caiosba caiosba merged commit 8779b32 into develop Sep 24, 2024
10 checks passed
@caiosba caiosba deleted the fix/CV2-5326-validate-video-size-after-converting-2 branch September 24, 2024 16:14
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.

3 participants