-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
How can I write the nginx config to store the image to redis
curl -X POST localhost:80/upload/123 --data-binary "@lena.png"
I am trying to use $request_body but it doesn't work as I guess this variable value isn't available in this location.
location ~ /upload/(.*) { redis2_query set $1 $request_body; redis2_pass 172.17.0.4:6379; }
The expected result is to store the image binary data under the 123 key passed as query param.
Is there any way to do that?
UPDATE:
I used the https://github.com/klestoff/read-request-body-nginx-module read_request_body; directive. In this case, I am not able to send image bigger than client_body_buffer_size (default value is 16k) which is bad in if the image is bigger.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels