0
我正在使用IUploader來允許用戶選擇圖像然後存儲在數據庫中;但是,這不會得到PDF文件。我如何獲得pdf文件?GWT如何讓用戶選擇PDF文件來存儲在數據庫中
// Create a new uploader panel and attach it to a document
//final SingleUploader defaultUploader = new SingleUploader();
defaultUploader.setAutoSubmit(true);
defaultUploader.setEnabled(true);
defaultUploader.avoidRepeatFiles(false);
defaultUploader.setStyleName("gwt-TextBox");
// Add a finish handler which will load the image once the upload finishes
defaultUploader.addOnFinishUploadHandler(onFinishUploaderHandler);
defaultUploader.getFileInput().asWidget().setStyleName("customButton");
defaultUploader.getFileInput().asWidget().setSize("90px", "20px");
flexTable_Award.setWidget(2, 0, defaultUploader);
無論您添加此項,會發生什麼情況:defaultUploader..setValidExtensions(new String [] {「pdf」})? – Euclides
謝謝你,只是試了一下,沒有什麼區別:-( – Glyn