Giter Site home page Giter Site logo

moonjie444 / frontend-download-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luffyzh/frontend-download-sample

1.0 2.0 0.0 51.33 MB

自己整理的一些项目中遇到过的关于上传和下载的一些Demo,仅供给位看官参考,避免踩坑,即插即用,欢迎fork和star🌟,为这个仓库添砖加瓦~(P.S. 个人认为如果没写过上传下载其实还是挺麻烦的~)

License: MIT License

HTML 23.83% JavaScript 75.61% CSS 0.56%

frontend-download-sample's Introduction

frontend-download-sample

自己整理的一些项目中遇到过的关于上传和下载的一些Demo,大前端系列(也就是纯前端 + node端完成的下载,只要获取到数据下载工作全是前端来做),仅供给位看官参考,避免踩坑,即插即用,欢迎fork和star🌟,为这个仓库添砖加瓦~(P.S. 个人认为如果没写过上传下载其实还是挺麻烦的~)

写在前面

我平时在项目中接触的也就是一些上传图片,上传安装包,下载图片,下载安装包以及整理数据生成excel文件下载下来。暂时还没有接触过其他类型的,所以本项目可能有一定的局限性,只是给大家提供一种思路或者方案,有其他想法欢迎评论~

纯前端下载形式

演示Demo

  第一步: npm install -g http-server

  第二步: 进入工程目录

  第三步: $ http-server

  第四步: 浏览器输入 http://127.0.0.1:8080/

基于a标签下载

基于location&iframe下载

前端下载利器FileSaver

node端配合下载(大前端)

演示Demo

  第一步: cd node-demo

  第二步: yarn install

  第三步: yarn start

  第四步: 在浏览器 http://localhost:3006/ 查看Demo

先下载到本地再下载到浏览器

直接下载到浏览器 => [推荐]

frontend-download-sample's People

Contributors

luffyzh avatar

Stargazers

Jacy avatar

Watchers

James Cloos avatar Jacy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.