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 8237551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:30:27+00:00 2026-06-07T19:30:27+00:00

I am creating pinboard (something like http://www.pinterest.com ). I am using MongoDB as database

  • 0

I am creating pinboard (something like http://www.pinterest.com). I am using MongoDB as database (to store all pins).

Pins {
    userid,
    img,
    title,
    description,
    comments {
        [userid, username, comment]
    }
}

I want to store images in gridFs. How I should link gridFs file to Pins.img. There should be only one image, but could be linked in multiple pins.

I can’t figure it out.

  • 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-07T19:30:29+00:00Added an answer on June 7, 2026 at 7:30 pm

    first, you need GridFS only if the stored data, a single image, would exeed the max document size of mongodb, which is 16MB since version 1.8.

    but in any case, you link two documents using a mongoref if they are in different collections. or just simply store the ID of the document holding the image data in your Pins document.

    to retreive the image data, you need to query the Pins documents you want to display loop over the result and query every single image from the image documents.

    this applies if you store the image in gridfs or in simple binary fields inside a normal document (the php documentation is outdated and still refers to 4MB max document size, it is 16MB now).

    if you resize the uploaded images to a reasonable resolution and store them as jpeg data, you would barely need 16MB anyway.

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

Sidebar

Related Questions

Creating MVC3 Razor Helper like Helper.BeginForm() says that it can be done using extension
Creating an a app, where I store bunch of photos in the drawable folder,
Creating a google map with store locations within 50 miles of user entered address.
Creating a simple RPG game, first time using XNA. Trying to get my character
I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
Creating a calculator-like dialog, I noticed that quickly clicking on a button in IE
Creating a table without tbody using javascript createElement/appendChild will not add tbody in Firebug
Creating sprite sheets aka texture atlases rather than using many hundres of individual images
Creating a birthday club. The database consists of clients and their pets. Some clients
Creating a site in with FrogCMS and using alot of jquery to create an

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.