This is a RESTful service implemented using Dropwizard.
All configurations are mentioned in the file 'fileupload.yml'.
Few things to note:
- Make sure the port that are mentioned in the YAML file are free when trying to run the service
- Make sure the log file location is present when running the application
To run the application:
- Run gradle:installApp task. NOTE: This uses a gradle wrapper to refer to the distribution we need to use. Ensure the distribution URL(mentioned in gradle-wrapper.properties) is not blocked or update it to a appropriate one.
- Once the task completes, from the 'build/install/mediamath/bin' folder run the appropriate start script as follows:
'./mediamath server '
Ideally the YAML file would be wrapped up with the distribution.
- Once the server starts successfully as indicated from the logs, open a browser and hit: http://localhost:8888/file/uploadFile
Service should be good to go.
- To get details of all files uploaded, hit: http://localhost:8888/file/all
Also, please make sure the mavenCentral() location is set for the gradle plugin in use.