Package sk.iway.iwcm.admin.upload
Class AdminUploadController
java.lang.Object
sk.iway.iwcm.admin.upload.AdminUploadController
Resolves conflicts reported by the administrative file upload flow.
Supports discarding temporary uploads, replacing existing files, and retaining both
standard files or file archive versions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionkeepboth(String fileKey, String destinationFolder, String fileName, String uploadType, jakarta.servlet.http.HttpServletRequest request) Retains the existing and uploaded files by creating an archive version or renaming a standard upload.overwrite(String fileKey, String destinationFolder, String fileName, String uploadType, jakarta.servlet.http.HttpServletRequest request) Overwrites an existing file with the uploaded temporary file.Discards a temporary upload when the user declines to replace an existing file.
-
Constructor Details
-
AdminUploadController
public AdminUploadController()
-
-
Method Details
-
skipkey
@PostMapping(path="/skipkey", produces="application/json") public String skipkey(@RequestParam String fileKey, jakarta.servlet.http.HttpServletRequest request) Discards a temporary upload when the user declines to replace an existing file.- Parameters:
fileKey- unique key of the temporary uploadrequest- current HTTP request- Returns:
- JSON containing the operation success flag
-
overwrite
@PostMapping(path="/overwrite", produces="application/json") public String overwrite(@RequestParam String fileKey, @RequestParam String destinationFolder, @RequestParam String fileName, @RequestParam String uploadType, jakarta.servlet.http.HttpServletRequest request) Overwrites an existing file with the uploaded temporary file. Delegates to archive-aware processing whenuploadTypeisfileArchive.- Parameters:
fileKey- unique key of the temporary uploaddestinationFolder- target folder pathfileName- name of the file to overwriteuploadType- upload category, such asfileArchiverequest- current HTTP request- Returns:
- JSON containing the operation result
-
keepboth
@PostMapping(path="/keepboth", produces="application/json") public String keepboth(@RequestParam String fileKey, @RequestParam String destinationFolder, @RequestParam String fileName, @RequestParam String uploadType, jakarta.servlet.http.HttpServletRequest request) Retains the existing and uploaded files by creating an archive version or renaming a standard upload.- Parameters:
fileKey- unique key of the temporary uploaddestinationFolder- target folder pathfileName- original file nameuploadType- upload category, such asfileArchiverequest- current HTTP request- Returns:
- JSON containing the operation result
-