DS-8668: adds check for HTTP 413 status code when importing an SAF file#2162
Merged
tdonohue merged 2 commits intoDSpace:mainfrom Apr 14, 2023
Merged
DS-8668: adds check for HTTP 413 status code when importing an SAF file#2162tdonohue merged 2 commits intoDSpace:mainfrom
tdonohue merged 2 commits intoDSpace:mainfrom
Conversation
8 tasks
tdonohue
approved these changes
Apr 14, 2023
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @nwoodward ! This looks good to me. I've tested it locally by setting the maximum file size to a very small value & attempting an SAF upload. It works as described & shows a more informative error.
For my tests, I simply set this in my local.cfg:
spring.servlet.multipart.max-file-size = 20KB
With this setting, any SAF ZIP file over 20KB throws the error. Also verified when it's unset or set to a larger value, larger files are accepted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
References
Description
This PR adds a check for an HTTP 413 response from the backend when importing an SAF file and displays a different message to the user.
Instructions for Reviewers
Checklist
yarn lintyarn check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.