move /chat_images to /images

master
Aevann 2024-10-29 22:40:41 +03:00
parent 49805fbca5
commit 01d252cc75
3 changed files with 1 additions and 6 deletions

View File

@ -22,7 +22,6 @@ COPY scripts/startup_docker_chat.sh /s
RUN pip3 install -r /requirements.txt RUN pip3 install -r /requirements.txt
RUN mkdir /images RUN mkdir /images
RUN mkdir /chat_images
RUN mkdir /songs RUN mkdir /songs
RUN mkdir /temp_songs RUN mkdir /temp_songs
RUN mkdir /videos RUN mkdir /videos

View File

@ -78,7 +78,7 @@ def speak(data, v):
file = None file = None
if data['file']: if data['file']:
if data['file_type'].startswith('image/'): if data['file_type'].startswith('image/'):
name = f'/chat_images/{time.time()}'.replace('.','') + '.webp' name = f'/images/{time.time()}'.replace('.','') + '.webp'
with open(name, 'wb') as f: with open(name, 'wb') as f:
f.write(data['file']) f.write(data['file'])
file = process_image(name, v) file = process_image(name, v)

View File

@ -47,10 +47,6 @@ server {
alias /images/; alias /images/;
include includes/serve-static; include includes/serve-static;
} }
location /chat_images/ {
alias /chat_images/;
include includes/serve-static;
}
location /videos/ { location /videos/ {
alias /videos/; alias /videos/;
include includes/serve-static; include includes/serve-static;