» » file

 
Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

Use front-end Javascript download file

Author: bamboo06 on 17-06-2020, 16:43, views: 2595

0 There is often a need to export data to Excel during project development, or to download documents. The simplest way to download is to directly request the file address of the server and download the file through the browser http. But in development, due to project requirements, the address of the file you want to download will not be exposed to the user, and authentication is required to allow the download of the file. What should we do at this time?
Use front-end Javascript download file

Category: Javascript

 

Implementation of file breakpoint resume by HTML5

Author: bamboo06 on 31-01-2019, 22:10, views: 1553

1 HTML5's FILE api has a slice method that splits the BLOB object. The front end obtains the corresponding file through the FileList object, segments the large file according to the specified splitting manner, and then passes it to the back end one by one, and then the back end then splicing the files in a sequence.
Implementation of file breakpoint resume by HTML5

At present, there are two commonly used methods for resuming breakpoints. One is to upload files through the websocket interface, and the other is through ajax. Both methods have their own advantages. Although websocket sounds more high-end, it uses different ones. The other algorithms outside the protocol are basically similar, and the server needs to open the ws interface. Here, the relatively convenient ajax is used to illustrate the idea of uploading the breakpoint.

Category: Javascript / HTML5

 

Tips about the file upload

Author: bamboo06 on 16-11-2017, 22:45, views: 16001

1 File upload WEB development in a wide range of applications, we often send microblogging, send micro-channel circle of friends have used the picture upload function. File upload refers to the process of uploading local images, videos, audio files to the server for other users to browse or download. Today, I talk to you about the common file (picture) upload methods and points to deal with.
Tips about the file upload

Category: PHP Scripts / Javascript / Plugins / Internet