storage yaratildi

This commit is contained in:
Husanjonazamov
2026-03-13 20:17:06 +05:00
commit 1c692b51b6
256 changed files with 8852 additions and 0 deletions

View File

@@ -0,0 +1 @@
from .fileupload import * # noqa

View File

@@ -0,0 +1,23 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from django_core.models import AbstractBaseModel
from model_bakery import baker
import uuid
class FileuploadModel(AbstractBaseModel):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
file = models.FileField(verbose_name=_("file"), upload_to="uploads/")
original_name = models.CharField(verbose_name=_("original name"), max_length=255)
bucket = models.CharField(verbose_name=_("bucket"), max_length=100, default="uploads")
content_type = models.CharField(verbose_name=_("content type"), max_length=100, null=True, blank=True)
file_size = models.BigIntegerField(verbose_name=_("file size"), null=True, blank=True)
def __str__(self):
return self.original_name
class Meta:
db_table = "file_uploads"
verbose_name = _("File Upload")
verbose_name_plural = _("File Uploads")