Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:27:12+00:00 2026-06-18T09:27:12+00:00

the user_logo file is actually a img data , how can I save this

  • 0

post data

the user_logo file is actually a img data ,

how can I save this img to a django model ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:27:13+00:00Added an answer on June 18, 2026 at 9:27 am

    Looks like the 'user_logo' is a JPEG file encoded in base16/hex (except the prefix '<')

    >>> 'ffd8ffe000104a4649460001010100'.decode('hex')
    '\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00'
    

    You could use ContentFile to store this sort of data

    obj.image.save(filename, ContentFile(the_decoded_content))
    

    Also, better to ask the dude implementing client-side whether he could post in multipart/form-data, if so the user_logo could be easily accessed through request.FILES…and less request body

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to load some data from the json file hosted on the
THIS QUESTION IS SOLVED — can't post an answer to my own question on
I hope you guys can help me. I've got a php file name login.php,
I have the following json file named json.txt with the following data, {id:99903727,nickname:TEST_MLA_OFF,registration_date:2010-12-03T14:19:33.000-04:00,country_id:AR,user_type:normal,logo:null,points:0,site_id:MLA,permalink:http://perfil.mercadolibre.com.ar/TEST_MLA_OFF,seller_reputation:{level_id:null,power_seller_status:null,transactions:{period:12 months,total:25,completed:25,canceled:0,ratings:{positive:0,negative:0,neutral:1}}},status:{site_status:deactive}}
I have a basic upload form: <form method=post action= enctype=multipart/form-data > <input type=file name=logo>
I'm developing an App where the user can add Different logo (drawable) on a
User Story: Action for Facebook that has open graph object. For this I need
User inserts a string in a html form input on browser. This string is
User has many Tracks, through Favorite. Favorite has some extra per-user meta-data about the
User Defined Function (UDFs) are functions that one can program and can be dynamically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.