简体   繁体   English

有什么方法可以显示 pdf、docx、图像、excel 和其他在反应中选择的文件类型的预览?

[英]Is there any way to show preview of pdf, docx, image, excel and other type of files selected in react?

I am currently creating a chat application with file upload betwwen two users, Is there any way to show a preview or when a file is uploaded show the file preview rather than showing the url in react?我目前正在创建一个在两个用户之间上传文件的聊天应用程序,有没有办法显示预览或上传文件时显示文件预览而不是显示 url 反应?

You can use: https://www.npmjs.com/package/react-file-viewer , it supports Images: png, jpeg, gif, bmp, including 360-degree images pdf csv xslx docx Video: mp4, webm Audio: mp3 Probably you are looking for some existing package(s). You can use: https://www.npmjs.com/package/react-file-viewer , it supports Images: png, jpeg, gif, bmp, including 360-degree images pdf csv xslx docx Video: mp4, webm Audio: mp3 可能您正在寻找一些现有的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何在该预览图像框中显示任何类型的图像,doc,excel,pdf - How can i display any type image,doc,excel,pdf in that preview image box 在上传到服务器之前预览 .doc/.docx/.pdf 文件 - Preview .doc/.docx/.pdf files before uploading to server 选择图像时显示预览div - Show a preview div when image is selected 如何显示使用相同 html 输入类型 = 文件选择的视频和图像的预览 - how to show preview of a video and an image selected using the same html input type=file 有没有一种方法可以将json数据导出到节点或客户端javascript中的docx,pdf和excel? - Is there a way to export json data to docx, pdf and excel in node or client javascript? 如何使用 php 将任何文件(如 .docx、xslx、img、txt)转换为 PDF 预览? - How can i convert any file like .docx,xslx,img,txt to PDF preview using php? 在反应中一次导入多个图像文件的任何简单方法 - Any easy way to import multiple image files at once in react 网页中的文档(doc,docx,pdf)预览 - Document(doc,docx,pdf) preview in web page NodeJS 创建 docx 文件的图像预览 - NodeJS creating an image preview of a docx file 如何在 Angular 应用程序中使用 base64 格式预览具有不同格式的文件,例如 .docx、.pdf、.xlsx? - How to preview files having different formats like .docx, .pdf, .xlsx using its base64 format in Angular app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM