bos.write(i);
}
bos.flush();
bis.close();
} catch (MalformedInputException malformedInputException) {
error.fire(new ErrorEvent("Error", "error uploading image<br/>" + malformedInputException.getMessage()));
} catch (IOException ioException) {
error.fire(new ErrorEvent("Error", "IO error<br/>" + ioException.getMessage()));
}
fileUploadManager.uploadFile(new FileHandler(file), album);
}