Joget Workflow v6 Released

Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

Description

  • org.joget.commons.util.FileManager
  • Under wflow-commons module
  • Utility methods used by the system to manager temporary files

Code Sample

Fields

THUMBNAIL_SIZE
public final static Integer THUMBNAIL_SIZE = 60; 

Default size used to generate thumbnail.

THUMBNAIL_EXT
public final static String THUMBNAIL_EXT = ".thumb.jpg"; 

File extension used for generated thumbnail.

Methods

createThumbnail
public static void createThumbnail(java.lang.String path, java.lang.Integer thumbWidth, java.lang.Integer thumbHeight)

Generates a thumbnail of a image file in temporary files folder by relative path

deleteFile
public static void deleteFile(java.io.File file)

Deletes a file

deleteFileByPath
public static void deleteFileByPath(java.lang.String path)

Deletes the temporary file from temporary files folder by relative path

getBaseDirectory
public static java.lang.String getBaseDirectory()

Gets directory path to temporary files folder

getFileByPath
public static java.io.File getFileByPath(java.lang.String path)

Gets the temporary file from temporary files folder by relative path

storeFile
public static java.lang.String storeFile(org.springframework.web.multipart.MultipartFile file)

Stores files post to the HTTP request to temporary files folder

 

  • No labels