Class AdminUploadController

java.lang.Object
sk.iway.iwcm.admin.upload.AdminUploadController

@RestController @RequestMapping("/admin/upload/") public class AdminUploadController extends Object
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 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 upload
      request - 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 when uploadType is fileArchive.
      Parameters:
      fileKey - unique key of the temporary upload
      destinationFolder - target folder path
      fileName - name of the file to overwrite
      uploadType - upload category, such as fileArchive
      request - 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 upload
      destinationFolder - target folder path
      fileName - original file name
      uploadType - upload category, such as fileArchive
      request - current HTTP request
      Returns:
      JSON containing the operation result