upload limit

This commit is contained in:
mi1468 2025-06-17 01:01:56 -07:00
parent b190fe0675
commit 4c2b402b7a
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class PdfSerializer(serializers.ModelSerializer):
# Check file size if image is provided
if 'pdf' in request.FILES:
pdf = request.FILES['pdf']
if pdf.size > 50 * 1024 * 1024: # 50MB limit
if pdf.size > 10 * 1024 * 1024: # 50MB limit
raise serializers.ValidationError("Pdf file too large ( > 50MB )")
# Check file extension

View File

@ -21,7 +21,7 @@ class VideoSerializer(serializers.ModelSerializer):
# Check file size if image is provided
if 'video' in request.FILES:
video = request.FILES['video']
if video.size > 500 * 1024 * 1024: # 500MB limit
if video.size > 200 * 1024 * 1024: # 500MB limit
raise serializers.ValidationError("Video file too large ( > 500MB )")
# Check file extension