blade254353074 / image-compress

πŸ—œ Browser side image compress & upload example, Android 4.0 compatible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image-compress

πŸ—œ Browser side image compress & upload example, Android 4.0 compatible.

Quick Look

https://blade254353074.github.io/image-compress/

This page contain the image compressing and uploading actions step by step.

How to start

  1. Install dependency & start the server
$ npm install

$ npm run server
  1. Open http://localhost:8080/

Features

1. File upload test server

I use two api interface to recive image file:

And, I use expressjs/cors to make sure all the requests can be sent by browser, whatever crossing domain.

2. Browser side

  • FilReader
  • window.URL
  • Canvas
  • Blob
  • BlobBuilder
  • atob
  • Uint8Array
  • multipart/form-data
  • FormData
  • XMLHttpRequest
  • Fetch

For details to see the article at https://sebastianblade.com/browser-side-image-compress-and-upload/.

About

πŸ—œ Browser side image compress & upload example, Android 4.0 compatible.

License:MIT License


Languages

Language:JavaScript 96.8%Language:HTML 3.0%Language:CSS 0.2%