Skip to content

Commit

Permalink
Fix gallery error
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Nov 6, 2024
1 parent de18316 commit a1e2f05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gallery/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def image(request, year, album_slug, image_slug, **kwargs):
@permission_required("gallery.add_image", raise_exception=True)
def upload(request):
file = upload_receive(request)
if file is None:
return UploadResponse(request, {"error": "No file"})
album = Album.objects.get(id=int(request.POST["object_id"]))
ext = os.path.splitext(file.name)[1].lower()

Expand Down

0 comments on commit a1e2f05

Please sign in to comment.