Hello,
i am using the the gwt uploader, but I have a problem by using CustomSettings. The CustomSettings and the FilePath aren't transferred to the server.
protected IAsWidget onCreateWidgetContent(final INotifications notifications, final String fileUploadType) { VPanel retVal = new VPanel(); JSONObject customSettings = new JSONObject(); customSettings.put(FileUploadInfoRequest.Properties.Type, new JSONString(fileUploadType)); final Uploader uploader = new Uploader() .setUploadURL(UrlUtil.buildGWTModuleBasedUrl("documentRepository/upload")) .setButtonText("Dateien hier hochladen") .setButtonWidth(250) .setButtonHeight(50) .setCustomSettings(customSettings) .setFilePostName("Test"); uploader.setUploadProgressHandler(new UploadProgressHandler() { public boolean onUploadProgress(UploadProgressEvent evt) { if (evt != null) notifications.onNewProgressInfo(evt.getBytesComplete(), evt.getBytesTotal()); return true; } }).setFileDialogCompleteHandler(new FileDialogCompleteHandler() { public boolean onFileDialogComplete(FileDialogCompleteEvent evt) { uploader.startUpload(); return true; } }).setUploadSuccessHandler(new UploadSuccessHandler() { @Override public boolean onUploadSuccess(UploadSuccessEvent uploadSuccessEvent) { notifications.onSingleUploadSuccessful(uploadSuccessEvent.getServerData()); return true; } }).setUploadCompleteHandler(new UploadCompleteHandler() { @Override public boolean onUploadComplete(UploadCompleteEvent uploadCompleteEvent) { uploader.startUpload(); return true; } }); retVal.add(uploader); return (IAsWidget) retVal; }
Log in to post a comment.
Hello,
i am using the the gwt uploader, but I have a problem by using CustomSettings. The CustomSettings and the FilePath aren't transferred to the server.