Class DefaultBlobUploadConfigurator

java.lang.Object
org.kawanfw.sql.api.server.blob.DefaultBlobUploadConfigurator
All Implemented Interfaces:
BlobUploadConfigurator

public class DefaultBlobUploadConfigurator
extends Object
implements BlobUploadConfigurator
Class that allows uploading Blob/Clobs. Default implementation.
It is not required nor recommended to extend this class or to develop another BlobUploadConfigurator implementation.
Extend this class and override upload(HttpServletRequest, HttpServletResponse, File) only if you want to implement your own advanced upload mechanism with special features: file chunking, recovery mechanisms, etc.
Author:
Nicolas de Pomereu
  • Constructor Details

    • DefaultBlobUploadConfigurator

      public DefaultBlobUploadConfigurator()
  • Method Details

    • upload

      public void upload​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, File blobDirectory) throws IOException, org.apache.tomcat.util.http.fileupload.FileUploadException
      Simple upload of file into user directory.
      Specified by:
      upload in interface BlobUploadConfigurator
      Parameters:
      request - the http servlet request
      response - the http servlet response to use to write the out stream on. The underlying output stream must *not* be closed at end of download, because it can be reused to send error message to client side after this method execution.
      blobDirectory - the directory into which the blob must be uploaded
      Throws:
      IOException - if any I/O exception occurs during the upload
      org.apache.tomcat.util.http.fileupload.FileUploadException - if any exception during upload