
the user_logo file is actually a img data ,
how can I save this img to a django model ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looks like the
'user_logo'is a JPEG file encoded inbase16/hex(except the prefix'<')You could use ContentFile to store this sort of data
Also, better to ask the dude implementing client-side whether he could post in
multipart/form-data, if so theuser_logocould be easily accessed throughrequest.FILES…and less request body