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

Document WAR configuration option for maxUploadSize #8424

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michikommader
Copy link
Contributor

In case you want to update maxUploadSize for an already deployed WAR or prior to deploying.

This is meant to replace the obsolete PR Adds WAR configuration option for maxUploadSize from the archived geonetwork/doc repository.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added the Documentation Documentation writing & improvements label Oct 14, 2024
By default, the maximum file size is set to 100Mb. This limit is set in `/services/src/main/resources/config-spring-geonetwork.xml` with the parameter `maxUploadSize`.
By default, the maximum file size for attachment uploads is set to 100Mb. When building GeoNetwork from source, this limit can be changed in `/services/src/main/resources/config-spring-geonetwork.xml` with the parameter `maxUploadSize`.

For deployment on an application server, or for adjusting the limit in an already running web application, the value for `maxUploadSize` can be changed in `WEB-INF/config.xml` accordingly:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is correct, this value is used for the old Jeeves MVC services, while the /services/src/main/resources/config-spring-geonetwork.xml value is used for Spring MVC services.

It is not clear to me if we still have Jeeves MVC services for file uploads or they have all been migrated to Spring MVC.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just worked on the following PR #8427 where I tested the file upload size error handling so I changed the upload size several times during testing and I would set it by adding the following option to the CATALINA_OPTS on application startup.

-Dapi.params.maxUploadSize=1000000000

The value is in bytes. So this sample sets the upload size to 1GB.

That value is used here

<property name="maxUploadSize" value="\${api.params.maxUploadSize}"/>

And seems to default to default to 100 MB.

api.params.maxUploadSize=100000000

I believe the maxUploadSize specified by Jeeves may be used for something else? I have not tested that value so I'm not sure where it is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @ianwallen for your clarification. I should have taken a more thorough look into the current configuration possibilities. I will revert my misleading lines in the proposed commit and instead just include one sentence on how you suggested to configure the maxUploadSize during application deployment.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation writing & improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants