FOUR-21235 | Enforce File Upload Limit When Using Chunked File Upload Component #7975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Ticket: FOUR-21235
This PR implements
FileSizeCheck
middleware to enforce file upload limits for chunked uploads processed byvue-simple-uploader
andlaravel-chunk-upload
. The middleware compares the file size against user-specific limits set inapp.php
.Solution
FileCheckMiddleware
inprocessmaker
app.php
How to Test
task/FOUR-21235
inprocessmaker
.app.php
:https://processmaker.test/api/1.0/requests/{request}/files
https://processmaker.test/api/1.0/processes/import/validation
https://processmaker.test/api/1.0/projects/import/validation
https://processmaker.test/api/1.0/pm-blocks/import/validation
https://processmaker.test/collections/import-chunked
https://processmaker.test/api/1.0/screens/import
https://processmaker.test/designer/decision-tables/import-chunked
https://processmaker.test/api/1.0/file-manager
upload_max_filesize
, such as a really large Collection or Screen, you can test to ensure that no errors are thrown when hitting these endpoints. But for the File Upload control in a Screen and the Public File upload, you should be able to upload any type of large file to test the functionality of the middleware.ci:package-collections:task/FOUR-21235-b
Code Review Checklist