add QA section
This commit is contained in:
parent
8456b1869a
commit
fb02534cd4
@ -13,6 +13,13 @@ python server.py <port> <webroot>
|
|||||||
```
|
```
|
||||||
where ```port``` is a int number of which port to use (default: 80), and ```webroot``` is the directory that containing the images(default: current directory).
|
where ```port``` is a int number of which port to use (default: 80), and ```webroot``` is the directory that containing the images(default: current directory).
|
||||||
|
|
||||||
|
## 3. Mostly asked problem
|
||||||
|
|
||||||
|
Q1. ```KeyError: webp```
|
||||||
|
Ans. We use webp format to encode the image and your system have no libwebp installed.
|
||||||
|
1. you can change the format to others by modifying the code ```img = img.save(img_stream, format='webp')``` in server.py/HTTPImageServer.handle_image(line 165)
|
||||||
|
2. you can install ```libwebp-dev``` and reinstall pillow package for webp support.
|
||||||
|
|
||||||
## 3. Structure.
|
## 3. Structure.
|
||||||
The server.py mainly provides two api.
|
The server.py mainly provides two api.
|
||||||
1. To access filelist under the given directory, please access:
|
1. To access filelist under the given directory, please access:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user