Set the file size limit to 30 MB:

@MultipartConfig(location="/tmp", fileSizeThreshold=1024*1024, maxFileSize=1024*1024*30, maxRequestSize=1024*1024*60) 

When trying to download a larger file, we get not IllegalStateException() , as written in the documentation, and this:

Unable to access the site

 Веб-страница по адресу http://localhost:8080/page, возможно, временно недоступна или постоянно перемещена по новому адресу. ERR_CONNECTION_ABORTED 

If the file size does not exceed the limit, everything works correctly.

If you do not put a restriction, but simply use the @MultipartConfing annotation, everything is fine too.

As soon as we set the limit and load the file larger, this is the problem.

Any tips?

  • and if you do not put annotations and try to download a file larger than 30mb - everything will be ok? - Andrew Bystrov
  • @Andrew_Bystrow I need to add an annotation, such an architecture of the project. But if I do not set any variables in it, but simply annotate it, then everything is ok for any files - Donatello
  • I asked this to the fact that maybe the browser stops responding to such large files - Andrew Bystrov
  • @Andrew_Bystrow if you specify simply (@MultipartConfig) without problems and 3 gb loads - Donatello

0