@permission_required("core.manage_shop")
def add_images(request):
    """
    Adds a global images.
    """
    if request.method == "POST":
        for file_content in request.FILES.getlist("files[]"):
            image = Image(title=file_content.name)
            try:
                image.image.save(file_content.name, file_content, save=True)
            except Exception, e:
                image.delete()
                logger.info((file_content.name, e) % "Upload of image failed: %s %s")
                continue

    result = json.dumps({"name": file_content.name, "type": "image/jpeg", "size": "123456789"})
    return HttpResponse(result, content_type='application/json')
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/images/views.py/add_images/swapped operands of `%`