[英]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.