Skip to content

Commit c1a88c1

Browse files
author
litongjava
committed
update download docx
1 parent e26d192 commit c1a88c1

File tree

1 file changed

+2
-2
lines changed
  • docs/zh/05_web开发

1 file changed

+2
-2
lines changed

docs/zh/05_web开发/11.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public HttpResponse download(String id, HttpRequest request) {
5858
available = inputStream.available();
5959
byte[] fileBytes = new byte[available];
6060
inputStream.read(fileBytes, 0, available);
61-
HttpResponse response = Resps.bytesWithContentType(request, fileBytes,
62-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=utf-8");
61+
String contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml. document; charset=utf-8";
62+
HttpResponse response = Resps.bytesWithContentType(request, fileBytes, contentType);
6363
return response;
6464
} catch (IOException e) {
6565
e.printStackTrace();

0 commit comments

Comments
 (0)