0
我想在瀏覽器中打開一個word文檔。所以,當用戶想要查看它時,我應該可以在瀏覽器中打開文檔。有沒有辦法做到這一點?如何在瀏覽器中打開文檔
本次代碼:
response.addHeader("Content-Type", "application/msword; charset=utf-8")
response.addHeader("Content-disposition", "inline; filename="+"\"testdoucment.doc\"")
response.setContentLength(content.getBytes().length)
response.outputStream<<content.bytes
response.outputStream.flush()
response.flushBuffer()