1.0.24 • Published 3 years ago

chueasy_react_uploader v1.0.24

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Chueasy React Uploader

Demo

https://swnumaster.github.io/chueasy_react_uploader/
https://demo.chueasy.com/chueasy_react_uploader

How to use

1. Install chueasy_react_uploader

    npm install chueasy_react_uploader

2. Write code as below:

    import ChueasyUploader from 'chueasy_react_uploader';

    let fileList = [
        {url: "https://blog.chueasy.com/wp-content/themes/easyportalpro/images/default/slide1.jpg", filename: "slide1.jpg"},
        {url: "https://blog.chueasy.com/wp-content/themes/easyportalpro/images/default/slide2.jpg", filename: "slide2.jpg"},
        {url: "https://blog.chueasy.com/wp-content/themes/easyportalpro/images/default/slide3.jpg", filename: "slide3.jpg"},
    ];

    let headers = {token: "NDQ4MDI4MzI4NTkzODc2OTkyMXwxNjIyNzA5MTg2LjcxNzUzMjk6YWRmNTRjNmUwOTU4YmM5MzQ1YTQyYjBkNDczMjBjNGNmNjVhMzkyZg=="};

    let uploadApi = "/api/image/upload";

    function parseResponse(respData) {
        console.log(respData);
        if (respData.code === 0) {
            return respData.content.filename;
        }
        return false;
    }

    function onFileListChange(fileList) {
        console.log(fileList);
    }

    function onException(e) {
        console.log(e);
    }

    const App = () => (
        <ChueasyUploader 
            fileList={fileList}
            uploadApi={uploadApi}
            inputName="uploadfile"
            parseResponse={parseResponse} 
            onFileListChange={onFileListChange}
            onException={onException}
            headers={headers}
            quality={0.8}
            maxSize={1024}
            maxCount={4}
        />
    );

Change log

V1.0.24 20220223 Remove font-family css from the component

V1.0.23 2021070 Adjust the height of the header of Demo in mobile devices Fix the bug that there is no any responses while just clicking an image in mobile devices

V1.0.22 20210622

change the prop name 'style' to 'frameStyle'

V1.0.21 20210611

use local images in the demo
add displaying version in the demo
1.0.24

3 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago