diff --git a/main/forms.py b/main/forms.py index f01f1d9ede56e8467622bd99e9390c82263bc7d6..55bb85f2b6c2609238ee7c18ac79b95a13fe347e 100644 --- a/main/forms.py +++ b/main/forms.py @@ -19,7 +19,7 @@ class MultipleFileField(forms.FileField): kwargs.setdefault("widget", MultipleFileInput()) super().__init__(*args, **kwargs) - TOTAL_MAX_FILE_SIZE = 25 * 1024 * 1024 # 25 MB + TOTAL_MAX_FILE_SIZE = 10 * 1024 * 1024 # 10 MB def clean(self, data, initial=None): single_file_clean = super().clean @@ -59,7 +59,7 @@ def validate_file_type(file): ) -def validate_file_size(file, max_size=10 * 1024 * 1024): # Default: 10 MB +def validate_file_size(file, max_size=5 * 1024 * 1024): # Default: 5 MB if file.size > max_size: raise ValidationError( f"Soubory mohou být max. {max_size / (1024 * 1024)} MB velké." diff --git a/main/templates/main/main_career_page.html b/main/templates/main/main_career_page.html index 060e80d33951a1d6b42087395f70831d94bbcc9e..be1372ec180d1b75a33be3a04727b7c0c2acff6f 100644 --- a/main/templates/main/main_career_page.html +++ b/main/templates/main/main_career_page.html @@ -86,7 +86,7 @@ {{ form.cv_file }} - <small class="text-grey-300">(Povinné, max. 10 MB)</small> + <small class="text-grey-300">(Povinné, max. 5 MB)</small> </section> <section class="flex flex-col gap-3 lg:items-center lg:flex-row"> <label @@ -97,7 +97,7 @@ {{ form.cover_letter_file }} - <small class="text-grey-300">(Povinný, max. 10 MB)</small> + <small class="text-grey-300">(Povinný, max. 5 MB)</small> </section> <section class="flex flex-col gap-3 lg:items-center lg:flex-row"> <label @@ -110,7 +110,7 @@ {{ form.other_files }} <small class="text-grey-300"> - (Max. 10 MB na jeden soubor, 25 MB celkem) + (Max. 5 MB na jeden soubor, 10 MB celkem) </small> </div> </section>