Skip to content

Commit d3b32d4

Browse files
committed
update readme
1 parent d9b8c64 commit d3b32d4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# draft-js-image-insert-demo
22

3-
43
```sh
4+
# 1. install and run demo page
55
yarn && yarn start
6-
open http://localhost:3000
6+
7+
# 2. run file upload/donwload sever locally
8+
docker run --rm -p 25478:25478 -v $HOME/tmp:/var/root mayth/simple-upload-server app -token f9403fc5f537b4ab332d /var/root
9+
# > time="2019-11-26T16:25:31Z" level=info msg="starting up simple-upload-server"
10+
# > time="2019-11-26T16:25:31Z" level=info msg="start listening" ip=0.0.0.0 port=25478 root=/var/root token=f9403fc5f537b4ab332d upload_limit=5242880
11+
12+
# 3. upload test
13+
curl --form file=@`pwd`/demo1.gif 'http://localhost:25478/upload?token=f9403fc5f537b4ab332d'
14+
# > {"ok":true,"path":"/files/demo1.gif"}
15+
16+
# 4. quit google chrome and re-run with cors-disabled
17+
open http://localhost:3000/ -a "/Applications/Google Chrome.app" --args --disable-web-security --user-data-dir
718
```
819

920
## demo
@@ -12,7 +23,6 @@ mutiple file
1223

1324
![img](./demo1.gif)
1425

15-
1626
resize
1727

1828
![img](./demo2.gif)

0 commit comments

Comments
 (0)