This commit is contained in:
krumel
2022-02-27 18:46:08 +01:00
parent 6abbc06015
commit f119d19906

View File

@ -1,4 +1,4 @@
erver {
server {
listen 80;
listen [::]:80;
@ -7,13 +7,15 @@ erver {
location /scan {
content_by_lua_block {
os.execute("scanimage --format jpeg >/srv/scans/image.jpg")
ngx.redirect("/scan/image.jpg")
epoc = ngx.time();
os.execute("scanimage --format jpeg >/srv/scans/image"..epoc..".jpg");
ngx.redirect("/scans/image"..epoc..".jpg");
}
}
location /scan/image.jpg {
alias /srv/scans/image.jpg;
location /scans {
autoindex on;
root /srv/;
}
}