add uuid
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
put `upload.lua` into:
|
||||
|
||||
```bash
|
||||
/usr/local/opt/openresty/nginx/resty_funcs
|
||||
```
|
||||
|
||||
post file:
|
||||
|
||||
```bash
|
||||
$ curl --location --request POST 'localhost/upload' \
|
||||
--form '=@"/Users/weli/works/task_server/src/test/resources/file_example_JPG_100kB.jpeg"'
|
||||
```
|
||||
|
||||
nginx config
|
||||
|
||||
```
|
||||
/usr/local/etc/openresty/nginx.conf
|
||||
```
|
||||
|
||||
```
|
||||
location /upload {
|
||||
content_by_lua_file /usr/local/opt/openresty/nginx/resty_funcs/upload.lua;
|
||||
}
|
||||
```
|
||||
|
||||
enable log:
|
||||
|
||||
```
|
||||
error_log /usr/local/etc/openresty/logs/error.log;
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user