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

[ServerManage] Add more input validation #424

Open
Injabie3 opened this issue Jul 1, 2021 · 1 comment
Open

[ServerManage] Add more input validation #424

Injabie3 opened this issue Jul 1, 2021 · 1 comment
Labels
bug Umbrella label for things that shouldn't happen and should be addressed relatively soon.

Comments

@Injabie3
Copy link
Member

Injabie3 commented Jul 1, 2021

When saving icon/banner images, we should validate some other things:

  • See if image is below a certain file size (discord imposes a limit, should check what that is).
  • Minimum dimensions as per recommended.

Also should add try/except block to background loop, since we don't ever want this loop to fail. Should use logger to print traceback as well.

@Injabie3 Injabie3 added bug Umbrella label for things that shouldn't happen and should be addressed relatively soon. and removed Status: Needs Triage labels Jul 1, 2021
@quachtridat
Copy link
Member

I have gathered information from Discord and some other sites.

Image upload size restrictions

  • Default: 8 MB
  • Nitro Classic: 50 MB
  • Nitro: 100 MB
  • Server Boost: 50 MB at level 2 for all members, 100 MB at level 3 for all members.

Dimensions

Recommended for server banners: 960 x 540 pixels
Recommended for server icons: 512 x 512 pixels

References

Discord: https://support.discord.com/hc/en-us/articles/360028038352
Discord: https://support.discord.com/hc/en-us/articles/360028716472
Pixelied: https://pixelied.com/blog/discord-profile-picture-size
How-To Geek: https://www.howtogeek.com/667816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Umbrella label for things that shouldn't happen and should be addressed relatively soon.
Projects
None yet
Development

No branches or pull requests

2 participants