Remove console log and keep the classic upload viewable

This commit is contained in:
Lewis7Lewis 2025-11-21 17:29:42 +01:00
parent 952f2ec584
commit da657fcf60
2 changed files with 41 additions and 22 deletions

View file

@ -191,11 +191,12 @@ class GalleryUpload(PermissionRequiredMixin, FormView):
def form_valid(self, form):
# Get or create gallery
if form.data.get("reptype","")=="json":
response_json = True
finish_json = form.data.get("end","")=="end"
else :
if self.request.accepts('text/html') or not self.request.accepts('application/json'):
response_json = False
finish_json = False
else :
response_json = True
finish_json = form.data.get("end","") == "end"
gallery = form.get_or_create_gallery()