こんにちは私の質問は、Play Frameworkのダウンロードを処理する方法です。 私のコードはJAVAです。a-tag Play Frameworkを使用したファイルをダウンロード
User user = User.find.byId(Long.parseLong(id));
File tempFile = null;
try {
tempFile = File.createTempFile(user.attachment_name, ".zip", null);
FileOutputStream fos = new FileOutputStream(tempFile);
fos.write(user.attachment);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return ok(tempFile);
が、私は私はあなたがコンテンツをダウンロードするためのResult
関数を作成する必要がリンク