void destroy ( ) { fileAccess . getAndUpdate ( channel -> { if ( channel != null ) { try { channel . close ( ) ; } catch ( IOException e ) { LOG . warn ( "Error closing file channel for disk file upload" , e ) ; } } return null ; } ) ; data . release ( ) ; }
Closes any file related access if the upload is on disk and releases the buffer for the file .