/** * Create a new instance of Upload. * <p> * The receiver must be set before performing an upload. */ public Upload() { // Get a server round trip for upload error and success. addUploadErrorListener(event -> { }); addUploadSuccessListener(event -> { }); // If client aborts upload mark upload as interrupted on server also addUploadAbortListener(event -> interruptUpload()); getElement().setAttribute("target", new StreamReceiver( getElement().getNode(), "upload", getStreamVariable())); }
String filename, String type, long contentLength) throws UploadException { StreamVariable streamVariable = streamReceiver.getStreamVariable(); if (streamVariable == null) { throw new IllegalStateException(