Merge branch 'Review' into 'main'
Review See merge request engineering/unturf/upload.unturf.com!4
This commit is contained in:
commit
74fc955f5e
2 changed files with 9 additions and 4 deletions
8
app.py
8
app.py
|
|
@ -1167,9 +1167,9 @@ def upload_media_post_view(request):
|
|||
return Response("No file uploaded.", status=400)
|
||||
|
||||
raw_bytes = media_file.file.read()
|
||||
max_size = 30 * 1024 * 1024 # 30 MB
|
||||
max_size = 100 * 1024 * 1024 # 100 MB
|
||||
if len(raw_bytes) > max_size:
|
||||
return Response("File size exceeds the 30MB limit.", status=400)
|
||||
return Response("File size exceeds the 100MB limit.", status=400)
|
||||
|
||||
file_size = len(raw_bytes)
|
||||
|
||||
|
|
@ -1324,9 +1324,9 @@ def edit_media_post_view(request):
|
|||
new_media_file = request.POST.get("media_file")
|
||||
if new_media_file and getattr(new_media_file, "filename", "").strip():
|
||||
raw_bytes = new_media_file.file.read()
|
||||
max_size = 30 * 1024 * 1024
|
||||
max_size = 100 * 1024 * 1024 # 100 MB
|
||||
if len(raw_bytes) > max_size:
|
||||
return Response("File size exceeds the 30MB limit.", status=400)
|
||||
return Response("File size exceeds the 100MB limit.", status=400)
|
||||
file_size = len(raw_bytes)
|
||||
filename = new_media_file.filename
|
||||
mime_type = get_mime_type(filename)
|
||||
|
|
|
|||
|
|
@ -176,6 +176,11 @@
|
|||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<a href="https://git.unturf.com/engineering/unturf/upload.unturf.com">PyraFiles public domain source code</a>
|
||||
</footer>
|
||||
|
||||
<!-- JavaScript for Mobile Menu -->
|
||||
<script>
|
||||
const mobileMenuButton = document.getElementById('mobile-menu-button');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue