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

  • SEARCH
  • Home
  • 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 8375025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:04:21+00:00 2026-06-09T15:04:21+00:00

I am using pymongo to store user comments in my Django project. I need

  • 0

I am using pymongo to store user comments in my Django project. I need to save comment images to the database and then show it on a page which is generated by a Django template,
but when I use request.FILES.get (...), read(...), the line does not save in Mongo, because it is not encoded in utf-8.

How can I properly save an image into mongoDB and then show on an HTML page?

  • 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-09T15:04:23+00:00Added an answer on June 9, 2026 at 3:04 pm

    You can try and use this api section: http://api.mongodb.org/python/2.2.1/api/bson/binary.html

    Wrap it inside of this object and then try and insert/save it.

    Disclaimer: I have never programmed python so I might be talking jibberish about the wrapping part, either way that page should tell you how to do it.

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

Sidebar

Related Questions

I have django installed on my server with pymongo and mongoengine.My django project settings.py
Using Pymongo for this scenario. I have User that has email, first_name, last_name. I
I am using pymongo to connect to my mongodb database. I am trying to
I'm using pymongo and I can't figure out how to execute the mongodb interactive
I am using pymongo and trying to find the best way to construct classes.
How to find names of all collections using PyMongo and find all fields in
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I am trying to perform a regex query using PyMongo against a MongoDB server.
I am unable to install pymongo using easy_install on python 3.2. c:\Python32\Scripts>easy_install pymongo ...
we are trying to make an api server for our project. we are using

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.