Serve upload files directly from nginx

This commit is contained in:
2025-04-06 12:08:15 +02:00
parent 91b30e7550
commit 67bc49fb21
10 changed files with 65 additions and 52 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 4.2.20 on 2025-04-05 16:28
# Generated by Django 4.2.20 on 2025-04-06 09:55
import django.db.models.deletion
from django.conf import settings
@ -15,13 +15,24 @@ class Migration(migrations.Migration):
name="QuickUploadImage",
fields=[
(
"uuid",
models.CharField(max_length=36, primary_key=True, serialize=False),
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("uuid", models.UUIDField(db_index=True, unique=True)),
("name", models.CharField(max_length=100)),
("image", models.ImageField(upload_to="upload")),
("content_type", models.CharField(max_length=50)),
("date", models.DateTimeField(auto_now=True, verbose_name="date")),
("image", models.ImageField(upload_to="upload/%Y/%m/%d")),
(
"created_at",
models.DateTimeField(auto_now_add=True, verbose_name="created at"),
),
("width", models.PositiveIntegerField(verbose_name="width")),
("height", models.PositiveIntegerField(verbose_name="height")),
("size", models.PositiveIntegerField(verbose_name="size")),
(
"uploader",
models.ForeignKey(