def create_local(request):
    name = request.POST['name']
    file_path = request.POST['filePath']
    description = request.POST['description']
    image_type = request.POST['type']
    try:
        imageUtils.create_local_image(name, description, file_path, image_type)
    except Exception as e:
        context = {'error': str(e)}
        return render(request, 'error.html', context)
    messages.info(request, 'Image Created!')
    return HttpResponseRedirect('/images')
def create_local(request):
    name = request.POST['name']
    file_path = request.POST['filePath']
    description = request.POST['description']
    image_type = request.POST['type']
    try:
        imageUtils.create_local_image(name, description, file_path, image_type)
    except Exception as e:
        context = {'error': str(e)}
        return render(request, 'error.html', context)
    messages.info(request, 'Image Created!')
    return HttpResponseRedirect('/images')