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

feat(upload): only allow some file types #302

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

LoneRifle
Copy link
Contributor

Problem

To influence user behaviour, only allow certain types of files to be uploaded

Solution

Use file-type and inspection of extension to determine whether
a file can be uploaded

  • Bring in file-type as a dependency
  • Implement FileTypeFilterService and drop into FileCheckController
  • Provide test coverage

@LoneRifle LoneRifle requested a review from yong-jie July 23, 2020 08:16
Use file-type and inspection of extension to determine whether
a file can be uploaded

- Bring in file-type as a dependency
- Implement FileTypeFilterService and drop into FileCheckController
- Provide test coverage
@LoneRifle LoneRifle force-pushed the feat/upload/allow-extensions branch from 22a4691 to 2b28b89 Compare July 23, 2020 08:36
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

lgtm

@LoneRifle LoneRifle merged this pull request into virus-scan Jul 23, 2020
@LoneRifle LoneRifle deleted the feat/upload/allow-extensions branch July 23, 2020 08:50
LoneRifle added a commit that referenced this pull request Jul 24, 2020
Use file-type and inspection of extension to determine whether
a file can be uploaded

- Bring in file-type as a dependency
- Implement FileTypeFilterService and drop into FileCheckController
- Provide test coverage
yong-jie pushed a commit that referenced this pull request Jul 28, 2020
Use file-type and inspection of extension to determine whether
a file can be uploaded

- Bring in file-type as a dependency
- Implement FileTypeFilterService and drop into FileCheckController
- Provide test coverage
xming13 referenced this pull request in xming13/GoGovSG Aug 21, 2020
Use file-type and inspection of extension to determine whether
a file can be uploaded

- Bring in file-type as a dependency
- Implement FileTypeFilterService and drop into FileCheckController
- Provide test coverage
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