RADAR-base / RADAR-Appserver

General purpose application server for the radar platform currently with capability to schedule push notifications
10 stars 1 forks source link

Impl. file upload endpoint #470

Open pvannierop opened 1 month ago

pvannierop commented 1 month ago

This PR will add a new endpoint that allows users to upload files to a storage location. This upload functionality is meant for data that is too large to be submitted tot the Kafka queue. After successful upload the upload endpoint returns the path of the newly created file. The application can then submit a new message to the Kafka queue that mentions this path.

For now, upload is only implemented for S3 storage.

The upload endpoint is disabled by default. It can be activated with the file-upload.enabled application property.

Remarks

pvannierop commented 2 days ago

@mpgxvii @yatharthranjan I have fixed the PMD linting errors. It forced me to remove duplication of string constants to member variables. Normally a good thing, but for tests it makes the tests less easy to write and interpret. Can we not better suppress linting checks for test classes, or at least suppress the The String literal "project1" appears 9 times in this file; ... errors for tests?

And on a side note. I think that it would be an improvement to separate style checks and unit/integration tests in separate GitHub Action workflows.