Class FileUploadController

java.lang.Object
de.ubs.xdm3.rest.FileUploadController

@RestController @RequestMapping("/api/files") public class FileUploadController extends Object
REST controller for handling file uploads. Provides an endpoint to upload files to the server.
  • Constructor Details

    • FileUploadController

      public FileUploadController()
  • Method Details

    • uploadFile

      @PostMapping("/upload") public org.springframework.http.ResponseEntity<String> uploadFile(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam("filename") String filename)
      Handles the file upload request. Saves the uploaded file to the specified directory.
      Parameters:
      file - the file to be uploaded
      filename - the name of the file to be saved
      Returns:
      a response entity indicating the result of the upload operation