Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

File size limit is 128KB max #50

Closed
mjlabe opened this issue Mar 21, 2018 · 1 comment
Closed

File size limit is 128KB max #50

mjlabe opened this issue Mar 21, 2018 · 1 comment

Comments

@mjlabe
Copy link

mjlabe commented Mar 21, 2018

Getting the following error with files greater than 128KB:

Unauthorized
You must be authenticated to access this page.

[warn] p.filters.CSRF - [CSRF] Check failed because no or invalid token found in body for /upload
[warn] p.filters.CSRF - [CSRF] Check failed with NoTokenInBody for /upload

@mjlabe
Copy link
Author

mjlabe commented Mar 21, 2018

I figured it out. See:

https://stackoverflow.com/questions/11696728/play-2-0-set-maximum-post-size-for-anycontent

parsers.text.maxLength is now depreciated and they suggest:

play.http.parser.maxMemoryBuffer=1024KB (or whatever size you need).

You can set it in (for example) ...\play-java-fileupload-example\conf\application.config

I don't know if there is a better way (i.e. at runtime) to set/change this, but this should work for me.

@mjlabe mjlabe closed this as completed Mar 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant