src/main/java/edu/ucla/library/bucketeer/verticles/S3BucketVerticle.java
private void closeFile(final AsyncFile aAsyncFile, final String aFilePath, final boolean aDeletableImage) {
        aAsyncFile.close(closure -> {
            if (closure.failed()) {
                LOGGER.error(closure.cause(), MessageCodes.BUCKETEER_047, aFilePath);
            }

            // If the file was uploaded successfully and it's a derivative image, delete it
            if (aDeletableImage) {
                vertx.fileSystem().delete(aFilePath, handler -> {
                    if (handler.failed()) {
                        LOGGER.error(handler.cause(), MessageCodes.BUCKETEER_161, aFilePath);
                    } else {
                        LOGGER.debug(MessageCodes.BUCKETEER_167, aFilePath);
                    }
                });
            }
        });
    }
/**
     * Closes reference to the file that should have been uploaded.
     *
     * @param aAsyncFile An asynchronous file handle
     * @param aFilePath The path to the file
     * @param aDeletableImage If the file was uploaded successfully and the image is deletable
     */
Closes reference to the file that should have been uploaded.
@param aAsyncFile An asynchronous file handle
@param aFilePath The path to the file
@param aDeletableImage If the file was uploaded successfully and the image is deletable
Closes reference to the file that should have been uploaded . @param aAsyncFile An asynchronous file handle @param aFilePath The path to the file @param aDeletableImage If the file was uploaded successfully and the image is deletable
private void closeFile(final AsyncFile aAsyncFile, final String aFilePath, final boolean aDeletableImage) {
        aAsyncFile.close(closure -> {
            if (closure.failed()) {
                LOGGER.error(closure.cause(), MessageCodes.BUCKETEER_047, aFilePath);
            }
            if (aDeletableImage) {
                vertx.fileSystem().delete(aFilePath, handler -> {
                    if (handler.failed()) {
                        LOGGER.error(handler.cause(), MessageCodes.BUCKETEER_161, aFilePath);
                    } else {
                        LOGGER.debug(MessageCodes.BUCKETEER_167, aFilePath);
                    }
                });
            }
        });
    }
private void closeFile ( final AsyncFile aAsyncFile , final String aFilePath , final boolean aDeletableImage ) { aAsyncFile . close ( closure -> { if ( closure . failed ( ) ) { LOGGER . error ( closure . cause ( ) , MessageCodes . BUCKETEER_047 , aFilePath ) ; } if ( aDeletableImage ) { vertx . fileSystem ( ) . delete ( aFilePath , handler -> { if ( handler . failed ( ) ) { LOGGER . error ( handler . cause ( ) , MessageCodes . BUCKETEER_161 , aFilePath ) ; } else { LOGGER . debug ( MessageCodes . BUCKETEER_167 , aFilePath ) ; } } ) ; } } ) ; }
Closes reference to the file that should have been uploaded.
Closes reference to the file that should have been uploaded .
// If the file was uploaded successfully and it's a derivative image, delete it