Skip to content

⬆️ EasyUploader is a lightweight js file upload library. EasyUploader是一个轻量级的的js文件上传库。

License

Notifications You must be signed in to change notification settings

hillpy/EasyUploader

Repository files navigation

License Build Status Minfied Size Downloads Github Release NPM Release

What is EasyUploader

EasyUploader is a lightweight js file upload library. It is developed based on HTML5、canvas、 fileReader and other technologies.It is more suitable for the use of mobile. Due to the different HTML support conditions of PC browsers, their use is limited, especially Internet explorer browsers. Flash will be considered to upload files in the later stage.It does not depend on other js libraries.

Why develop

File upload is very common in web development, and there are many existing upload librarys (webuploader uploaderfy, etc.).But the feeling is still heavy, not light enough, and want to control as much as possible and familiar with the source code.Therefore, I came up with the idea of developing an upload library and considered making it as simple and practical as possible.By the way, I can learn a lot of knowledge (HTML5 canvas closure tools, etc.).

Document

EasyUploader document

Online example

EasyUploader example

Features

  • file upload
  • picture compress
  • drag upload
  • fix photo orientation

Remark

This project is being developed. The release is still a test version for the time being.And I'm sorry my English is poor.Please submit the project questions on github issue.If you give me a star, I will be very happy.

How to install

  • use NPM.

    npm install easyuploader --save
    
  • use script (unpkg CDN).

    <script src="https://unpkg.com/easyuploader/dist/easyuploader.min.js"></script>
    

How to run

  • run project

    1. Clone project.

      git clone https://github.com/hillpy/EasyUploader.git
      
    2. Install NPM dependencies package.

      npm install
      
    3. Open rollup watching and open web service(need php environment). url: localhost:1180/example/inex.html.

      npm run dev
      
    4. Bundle and build.

      npm run build
      
  • run gitbook

    1. Global installation gitbook-cli.

      npm install gitbook-cli -g
      
    2. Install NPM dependencies package.

      cd doc && gitbook install
      
    3. Open service.

      gitbook serve
      

CHANGELOG

version log

TODO

1. avoid id collisions

2. limit file upload types

  1. multiple files upload

  2. picture clip

  3. breakpoint to continue and file slice upload

Repository link

Github
Gitee

LICENSE

MIT