[Answered ]-Django jquery ajax image upload

2👍

Files are in request.FILES not request.POST. You aren’t seeing any errors for this because your are never confirming that b actually got a value, though I’m surprised you’re not seeing an error for background cannot be null.

Additionally you should try using a ModelForm for this. It will wrap up a lot of the behavior you’re having to code in.

👤John

Leave a comment