Package de.bytestore.hostinger.api
Class AttachmentController
java.lang.Object
de.bytestore.hostinger.api.AttachmentController
@RestController
@Configuration
@RequestMapping("/internal/attachment")
public class AttachmentController
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionAttachmentController(io.jmix.core.DataManager dataManager, io.jmix.core.FileStorage fileStorage) -
Method Summary
Modifier and TypeMethodDescriptionvoidattatchmentGet(String id, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletRequest servletRequest) Retrieves the file associated with the provided ID and streams it to the response.
-
Constructor Details
-
AttachmentController
public AttachmentController(io.jmix.core.DataManager dataManager, io.jmix.core.FileStorage fileStorage)
-
-
Method Details
-
attatchmentGet
@GetMapping("/{id}") public void attatchmentGet(@PathVariable String id, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletRequest servletRequest) throws RuntimeException Retrieves the file associated with the provided ID and streams it to the response.- Parameters:
id- the ID of the attachment file to retrieveresponse- the HTTP response objectservletRequest- the servlet request object- Throws:
RuntimeException- if an error occurs while retrieving or streaming the file
-