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

Check mime type of attachment #364

Open
latin-panda opened this issue Sep 14, 2020 · 0 comments
Open

Check mime type of attachment #364

latin-panda opened this issue Sep 14, 2020 · 0 comments
Labels
Priority: 3 - Low Nice to have Type: Improvement Make something better

Comments

@latin-panda
Copy link
Contributor

What feature do you want to improve?
Medic Conf has some actions (upload-branding, upload-resources, upload-partners, etc) that uses a common library to get attachments and validates it's MIME Type. The MIME type checking got improved here by removing the hard coded types and use a library to do a more reliable checking.

Describe the improvement you'd like
Some actions might have special considerations which some types are only allowed. For example: upload-partners only upload images types, but not json files, upload-branding uploads images and also .ico type.
We might need to identify each action that uses attachment, determine the file types it needs and add specific MIME Type checking to present a warning if there's an invalid type uploaded.

Describe alternatives you've considered
Possibly pass a list of allowed MIME Types from the action definition to the attachment library and allow the library make the checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 3 - Low Nice to have Type: Improvement Make something better
Projects
None yet
Development

No branches or pull requests

1 participant