It's about Mod_Security issue. Contact to the hosting support and tell them to disable Mod_Security.
On Thursday, June 18, 2020 at 11:30:30 AM UTC+6, MUGOYA DIHFAHSIH wrote: > > @Mangla, essentially what i want to do is to serve uploaded images on a > shared host through the media directory in my project root. I have deployed > the web app the static files such as css and images are working fine, but > when i try to submit a form that has imagefield into the database, it > throws 404 error. I know it has to deal with the Aoache web server and the > mod_wsgi but how? > > On Wed, 17 Jun 2020 at 10:06, Vishesh Mangla <[email protected] > <javascript:>> wrote: > >> One thing that can be done is to save the image as a base64 string in the >> database. >> https://stackoverflow.com/questions/3715493/encoding-an-image-file-with-base64 >> >> >> >> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for >> Windows 10 >> >> >> >> *From: *MUGOYA DIHFAHSIH <javascript:> >> *Sent: *14 June 2020 19:15 >> *To: *Django users <javascript:> >> *Subject: *Django Saving a form with Imagefield on shared host >> >> >> >> I am working on django project and now i have deployed it with Namecheap >> >> When i submit a form that does not have an ImageField, the form submits >> successfully on the shared host >> >> but when i submit a form with one of the fields ImageField, it raises 404 >> error. >> >> but on the localhost, the forms work perfectly. >> >> what can i do to submit such forms on a shared host. >> >> Thanks. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/b79bb9b5-46b4-43eb-9ea5-3eaab14336ddo%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/b79bb9b5-46b4-43eb-9ea5-3eaab14336ddo%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/3F4C1D42-FB11-49A2-8A6E-BF990EE847AD%40hxcore.ol >> >> <https://groups.google.com/d/msgid/django-users/3F4C1D42-FB11-49A2-8A6E-BF990EE847AD%40hxcore.ol?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83362928-033b-4260-96cf-0966ed37f590o%40googlegroups.com.

