您好,我是 Vaadin 框架的新手。 在这里,我在我的项目中使用 vaadin 链接 我需要在我的应用程序中放置一个用于下载文件的链接 我无法执行此操作 任何人都可以发送 hwich 的代码 如果我单击 vaadin 链接,那么我就可以下载该文件当前步骤是用户在上一步中上传的。
最佳答案
详细教程可以在这个official vaadin wiki article中找到.
Providing a file for download to the user might be trickier that what it seems - the file should be downloaded instead of just opened by the browser, download blockers should be avoided, a unique URL should be generated and server-side memory should be released when the file is no longer available for download. All this is taken care of by new
FileDownloader extension that can make almost any component start a download when clicked.
关于download - Vaadin 链接下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29386630/