-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Adding files configuration fields #154013
[Cases] Adding files configuration fields #154013
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
describe('no mime types', () => { | ||
const schema = ConfigSchema.validate({ files: { allowedMimeTypes: [] } }); | ||
|
||
it('sets the cases file kind allowed mime types to only image png', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sets the cases file kind allowed to no mime types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LTGM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/plugins/files
lgtm !
@jonathan-buttner How do I attach a file to a case? 😅 I can't seem to find the control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
💚 Build Succeeded
Metrics [docs]Module Count
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
This PR adds the new configuration settings to the docs. The configurations were added in this PR: #154013 --------- Co-authored-by: lcawl <lcawley@elastic.co>
This PR adds the follow cases config options from this PR to the docker script. #154013 ``` xpack.cases.files.allowedMimeTypes xpack.cases.files.maxSize ```
Fixes: #151935
This PR allows the mime types and max file size for the files functionality within cases to be configured through the kibana.yml. We set the defaults maxSize to be 100 mb and if it is not set by the user we also restrict images to be 10 mb. If the
maxSize
is set by the user we use it for all mime types including images (or whatever the user has specified inallowedMimeTypes
).The file service changes are just mocks to help with testing some of the configuration options.
New fields
Release Notes
Cases added two configuration options to allow users to control which files mime types are allowed to be attached to cases and the approved max size of a file being upload.
xpack.cases.files.allowedMimeTypes
- An array of strings representing the allowed mime types to be attached to a case.xpack.cases.files.maxSize
- A number representing the file size limit for files being attached to a case (in bytes).