Front-end vue3 implements local and online file preview (including pdf/txt/mp3/mp4/docx/xlsx/pptx)

1. Only online preview is required, and the file address is accessible from the public network (1) Free preview of Microsoft office (recommended) Supports free preview of multiple office file formats such as doc/docx/xls/xlsx/ppt/pptx //Sample code //? Splice the address that needs to be previewed after https://view.officeapps.live.com/op/view.aspx?src=, as follows:\ let url=”http://xxx.com/files/demo.doc” window.open(“?https://view.officeapps.live.com/op/view.aspx?src=” + encodeURIComponent(?url)) (2) […]

Vue does docx/pdf/excle file preview

1. excel preview Method 1: Use xlsx plug-in ①Introduce xlsx npm install xlsx Page reference dependency import * as XLSX from ‘xlsx’ Using this kind of reference can solve the problem of version inconsistency in the import method of import XLSX from ‘xlsx’. ②Code View excel sheet Get the contents of the table //Call event […]

Vue implements reading local model files and previewing its animation online

demo address 1. Demand background The company used to need its own internal model library and the function of model preview, so it found a model preview plug-in, but found that the animation could not be previewed, so it specially solved this problem. Disadvantages: After developing this function, I feel that it is redundant because […]

Java file segmented upload, download, preview interface

Multiple upload private Map<String, List<File>> chunksMap = new ConcurrentHashMap<>(); public void upload(PartFile fileInfo, MultipartFile chunk) {<!– –> // int currentChunk = fileInfo.getCurrentChunk(); int totalChunks = fileInfo.getTotalChunks(); String fileName = fileInfo.getFileName(); String chunkName = chunk.getOriginalFilename() + ‘.’ + currentChunk; File chunkFile = new File(uploadCachePath, chunkName); try (BufferedInputStream bis = new BufferedInputStream(chunk.getInputStream()); BufferedOutputStream bos = new BufferedOutputStream(new […]

[OfficeOnline] How to implement document online preview in Java (3)

Article directory introduction maven introduces dependencies 1. Quick setup 2. Document Converter Introduction In the previous article, we introduced how to install the third-party tool LibreOffice. So, this article will introduce how to use JODConverter in Java to achieve document preview. maven introduces dependencies pom file <properties> <jodconverter.version>4.4.6</jodconverter.version> </properties> <dependency> <groupId>org.jodconverter</groupId> <artifactId>jodconverter-core</artifactId> <version>${jodconverter.version}</version> </dependency> <dependency> […]

Amazing, this html5 player supports video switching, double-speed switching, and video preview

Very cool! ! This article will explain the functions related to video playback (based on cloud platform), including initializing the player, setting player size, video switching, double speed switching, video preview, customizing the start/end time of video playback, prohibiting drag and drop progress, Player skin, control buttons, playback controls, etc. Picture / html5 video player […]

Use ionic + cordova + vue3 to select albums, take pictures, upload and preview pictures

Table of Contents 1. Upload component upload.vue 1.1 Template planning 1.2 Click the Add button 1.2.1 Implement inquiry pop-up box 1.2.2 Realize taking pictures 1.2.3 Implement album selection 1.2.4 Implement file upload 1.2.5 Verify image type and upload 1.2.6 Get image list 1.2.7 Add image attachments within the component 2. Image enlargement component enlarge-image.vue 2.1 […]

Java implements the online preview function of office files such as word, excel, ppt, txt, etc.!

How to use Java to implement the online preview function of office files such as word, excel, ppt, txt, etc.? This article tells you the answer! Implementing the online preview function of office files in java is a need that everyone may encounter at work. Some online companies specialize in providing such services, but they […]