0001-cartads-cs-limit-file-uploads-to-25MB-40735.patch
passerelle/apps/cartads_cs/models.py | ||
---|---|---|
651 | 651 |
else: |
652 | 652 |
if request.FILES['files[]'].content_type not in ('application/pdf', 'image/jpeg'): |
653 | 653 |
return [{'error': force_text(_('The file should be a PDF document or a JPEG image.'))}] |
654 |
if request.FILES['files[]'].size > 26214400: |
|
655 |
return [{'error': force_text(_('The file should not exceed 25MB.'))}] |
|
654 | 656 |
file_upload = CartaDSFile( |
655 | 657 |
tracking_code=tracking_code, |
656 | 658 |
id_piece=id_piece, |
657 |
- |