Unable to upload file in Tomcat 10(Ubuntu 24.04 LTS) Production Server

Hi,
I am unable to upload file in my deployed Server Tomcat 10, Ubuntu 24.04 (Unable to upload a file using jmix 2 UI and also with REST API.). But i can able to upload the file successfully in my development environment(localhost). I am getting the following error in the Production Server:
Screenshot from 2025-01-20 20-51-58

And below is my configurations:

  1. My build.gradle has the necessary dependency:
implementation 'io.jmix.localfs:jmix-localfs-starter'
  1. For REST Configuration for file Upload:
@SpecificPolicy(resources = "rest.fileUpload.enabled")
    void restFileUpload();
  1. Specified the location in the application.properties
jmix.localfs.storage-dir = /opt/file-storage

Thanks in advance.

Hello @vimalkumar010,

Please send your server logs, perhaps the application does not have access to the folder for storing files.

Regards,
Nikita

Hi

When the file is too big, I get the same error; did you check the fileupload limit size ?

Regards

Felix