}
return result;
}
public static UploadField createFileField(String caption, String buttonCaption) {
UploadField field = new UploadField();
field.setFieldType(FieldType.BYTE_ARRAY);
field.setCaption(resolveProperties(caption));
field.setButtonCaption(resolveProperties(buttonCaption));
field.setStorageMode(StorageMode.MEMORY);
field.setFileFactory(new FileFactory() {
VaadinConfig config = Beans.getReference(VaadinConfig.class);
public File createFile(String fileName, String mimeType) {
File f = new File(config.getUploadPath() + fileName);