File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11# draft-js-image-insert-demo
22
3-
43``` sh
4+ # 1. install and run demo page
55yarn && 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-
1626resize
1727
1828![ img] ( ./demo2.gif )
You can’t perform that action at this time.
0 commit comments