Interface IUploadedFileStore

All Known Implementing Classes:
UploadedFileCacheService

public interface IUploadedFileStore
Storage of the content of the uploaded files outside the HTTP session. With several instances the session is written to the shared session store after each request that reads it: an uploaded file kept in the session would be written again on every request. The content is written once to this store and the session only keeps its id.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(String strId)
    Removes the content of an uploaded file
    boolean
    Tells whether the content of the uploaded files is kept outside the session
    byte[]
    load(String strId)
    Loads the content of an uploaded file
    store(byte[] content)
    Stores the content of an uploaded file
  • Method Details

    • isActive

      boolean isActive()
      Tells whether the content of the uploaded files is kept outside the session
      Returns:
      true when the files are stored here, false when they stay in the session (one instance)
    • store

      String store(byte[] content)
      Stores the content of an uploaded file
      Parameters:
      content - the content
      Returns:
      the id of the stored content, or null when the content could not be stored and must stay in the session
    • load

      byte[] load(String strId)
      Loads the content of an uploaded file
      Parameters:
      strId - the id given by store(byte[])
      Returns:
      the content, or null when it is no longer stored
    • delete

      void delete(String strId)
      Removes the content of an uploaded file
      Parameters:
      strId - the id given by store(byte[])