eclipse-basyx / basyx-java-server-sdk

MIT License
60 stars 47 forks source link

[BUG] File Upload is not working #433

Closed oliverbusch closed 2 months ago

oliverbusch commented 2 months ago

File Upload does not work

To Reproduce Steps to reproduce the behavior:

  1. Setup BaSyx (examples/BaSyxMinimal)
  2. Open http://localhost:3000/
  3. Select the first entry TestAssetAdministrationShell
  4. Goto TestSubmodel/ExampleSubmodelE/ExampleSubmodelE
  5. Upload a pdf file
  6. See error

Expected behavior File should be Upload does not work

**BaSyx (please complete the following information):

Screenshots image image

System OS: [Docker on Linux]

aaronzi commented 2 months ago

Hi @oliverbusch,

I'm pretty sure the problem you are facing is related to the payload size (so the size of your PDF). By default, the maximum payload size is 1MB. Your PDF is probably bigger than that. Could you please verify that? To solve the problem, you can add the following lines to the aas-env.properties file:

spring.servlet.multipart.max-file-size=128MB
spring.servlet.multipart.max-request-size=128MB

You can adapt the size to your needs. Please inform us if this helped.

oliverbusch commented 2 months ago

Hi @aaronzi, not that's not the case. I've tested it with the attached file Test-pdf_4.pdf

By the way, it is not possible to download a file. But that's another bug.

FriedJannik commented 2 months ago

Hi @oliverbusch I noticed that your UI tries to connect to KeyCloak. If you had a secure BaSyx setup running before, there may be a caching problem in the UI. Could you please try to reload the UI with Ctrl+F5 and try again? It would be nice if you could let us know if this helps, thank you.

oliverbusch commented 2 months ago

Hi @aaronzi, it looks like the UI wants to connect a KeyCloak. But I am using the examples/BaSyxMinimal configuration and have never installed any other configuration before.

oliverbusch commented 2 months ago

With the version from today (09:09:2024 13.20) it works again.