Class UserFile

java.lang.Object
formflow.library.data.UserFile

@Entity @Component public class UserFile extends Object
A class representing what an uploaded file which can be saved in either S3 or Azure
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createFileInfo(UserFile userFile, String thumbBase64String)
    Creates a HashMap representation of an uploaded user file that holds information about the file (original file name, file size, thumbnail and mime type) which we add to the session for persisting user file uploads when a user refreshes the page or navigates away.
    boolean
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UserFile

      public UserFile()
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createFileInfo

      public static HashMap<String,String> createFileInfo(UserFile userFile, String thumbBase64String)
      Creates a HashMap representation of an uploaded user file that holds information about the file (original file name, file size, thumbnail and mime type) which we add to the session for persisting user file uploads when a user refreshes the page or navigates away.
      Parameters:
      userFile - class representing the file the that was uploaded by the user
      thumbBase64String - base64 encoded thumbnail of the file the user uploaded
      Returns:
      Hashmap representation of a user file that includes original file name, file size, thumbnail as base64 encoded string, and mime type.