Package de.ubs.xdm3.rest
Class FileUploadController
java.lang.Object
de.ubs.xdm3.rest.FileUploadController
REST controller for handling file uploads.
Provides an endpoint to upload files to the server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> uploadFile(org.springframework.web.multipart.MultipartFile file, String filename) Handles the file upload request.
-
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 uploadedfilename- the name of the file to be saved- Returns:
- a response entity indicating the result of the upload operation
-