package com.drinkool.controller; import com.drinkool.services.FileService; import io.smallrye.mutiny.Uni; import jakarta.inject.Inject; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; import jakarta.ws.rs.core.Response; import java.io.File; import org.eclipse.microprofile.rest.client.inject.RestClient; import org.jboss.resteasy.reactive.RestForm; @Path("/api/file") public class FileController { @Inject @RestClient FileService fileService; @POST public Uni upload(@RestForm File file) { return fileService.upload(file); } @GET @Path("/{name}") public Uni get(@PathParam("name") String name) { return fileService.get(name); } }