chore: improve docker setup (#1150)
This commit is contained in:
parent
23d08a2ad1
commit
ffc6077e9b
11 changed files with 52 additions and 26 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue