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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:10:35+00:00 2026-05-12T08:10:35+00:00

What would be the best method to implement the following scenario: The web site

  • 0

What would be the best method to implement the following scenario:
The web site calls for a image gallery that has both private and public images to be stored. I’ve heard that you can either store them in a file hierarchy or a database. In a file hierarchy setup how would prevent direct access to the image. In a database setup access to the images would only be possible via the web page view. What would be a effective solution to pursue?

[Edit] Thanks all for the responses. I decided that the database route is the best option for this application since I do not have direct access to the server. Confined to a webroot folder. All the responses were most appreciated.

  • 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-05-12T08:10:35+00:00Added an answer on May 12, 2026 at 8:10 am

    Having used both methods I’d say go with the database. If you store them on the filestore and they need protecting then you’d have to store them outside the web-root and then use a handler (like John mentions) to retrieve them, anyway. It’s as easy to write a handler to stream them direct from database and you get a few advantages:

    • With database you don’t need to worry about filestore permissions or generating unique filenames or folder hierarchies etc.
    • With database you can easily apply permissions and protection directly – no trying to work out who can view what based on paths etc.
    • With a database you can store the image and metadata all together – when you delete the metadata you delete the image – no possibility of orphaned records where you delete from database but not from filestore
    • Easier to back-up database and images and then restore

    The disadvantage is that of performance, but you can use caching etc. to help with that. You can also use FILESTREAM storeage in SQL Server 2008 (and 05?) which means you get filesystem performance but via the DB:

    “FILESTREAM integrates the SQL Server
    Database Engine with an NTFS file
    system by storing varbinary(max)
    binary large object (BLOB) data as
    files on the file system. Transact-SQL
    statements can insert, update, query,
    search, and back up FILESTREAM data.
    Win32 file system interfaces provide
    streaming access to the data.

    FILESTREAM uses the NT system cache
    for caching file data. This helps
    reduce any effect that FILESTREAM data
    might have on Database Engine
    performance. The SQL Server buffer
    pool is not used; therefore, this
    memory is available for query
    processing.”

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

Sidebar

Ask A Question

Stats

  • Questions 148k
  • Answers 148k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try moving the # in your lexer file from COLOR… May 12, 2026 at 9:20 am
  • Editorial Team
    Editorial Team added an answer Sorry for all of you if I make waste your… May 12, 2026 at 9:20 am
  • Editorial Team
    Editorial Team added an answer I think your best option would be to use the… May 12, 2026 at 9:20 am

Related Questions

Let's suppose I have an interface named Controller. Several classes implement this interface and
I'm doing research into a web API for my company, and it's starting to
I'm revisiting and re-implementing the code that caused me to ask this question about
The reply to a recent question of mine indicated that an actor processed its
Say you have an app, that you want to provide users ability to browse

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.