Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ docker compose up
Start the service with tracing enabled:

```shell
TRACING_ENABLED=true COLLECTOR_ENDPOINT="http://localhost:4317" mvn compile exec:java
MAVEN_OPTS="-Djava.io.tmpdir=target/classes/static-resources" TRACING_ENABLED=true COLLECTOR_ENDPOINT="http://localhost:4317" mvn compile exec:java
```

**Note**: The MAVEN_OPTS is only required if you are using a local file system (i.e. no `GOOGLE_APPLICATION_CREDENTIALS` provided)

## Using the Application

Once the application is running (default port: 9000), you can interact with it through multiple interfaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public String uploadPng(byte[] data, String pathPrefix, String namePrefix) {

Files.write(tempFile, data);

return "file://"+tempFile.toAbsolutePath();
//This relies on the param MAVEN_OPTS="-Djava.io.tmpdir=target/classes/static-resources"
// being supplied to override the temp file to go to the server static file location
return "/static/"+tempFile.getFileName().toString();
} catch (IOException e) {
log.error("Error while trying to store the PNG file", e);
throw new RuntimeException(e);
Expand Down
Loading