chore: improve docker setup (#1150)

This commit is contained in:
pablohashescobar 2023-05-29 12:11:16 +05:30 committed by GitHub
parent 23d08a2ad1
commit ffc6077e9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 52 additions and 26 deletions

View file

@ -17,11 +17,8 @@ def get_upload_path(instance, filename):
def file_size(value):
# File limit check is only for cloud hosted
if not settings.DOCKERIZED:
limit = 5 * 1024 * 1024
if value.size > limit:
raise ValidationError("File too large. Size should not exceed 5 MB.")
if value.size > settings.FILE_SIZE_LIMIT:
raise ValidationError("File too large. Size should not exceed 5 MB.")
class FileAsset(BaseModel):