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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:44:00+00:00 2026-05-26T22:44:00+00:00

I am often developing web applications that handle different media files (mp3, image files,

  • 0

I am often developing web applications that handle different media files (mp3, image files, pdf, etc..)

Some of these files are private to the site visitors, some are readable for all.

So far, I’ve always structured it like this:

/var/www/myapp/uploads/private/other_files_and_folders
/var/www/myapp/uploads/public/other_files_and_folders

Then I would protect the private/ folder with a server configuration (only identified users can access the folder), and public/ would be readable for all.

I’m just wondering if this approach is ok or if there is a better one.

My concern here is that, in order to keep consistency and be easily manageable, the folder structure within my private and public folders is the same. That way I can store relative paths in my DB, and move the files from public to private without having to rename the file path in my DB.
As a result, visitors can view a part of my private/ folder structure, since it’s similar to the public/ one.

What’s your opinion on this?

  • 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-26T22:44:01+00:00Added an answer on May 26, 2026 at 10:44 pm

    I’m not sure I understand your problem, but having the same structure in both directories and needing to easy manage the files within them, I would put all the files in the same directory, denying the access to them from outside the server, and manage the file permissions (public or private) to download from outside with a server script. So, through that server script we could download the file if we are identified, may be by asking the script to copy that file to a temp directory that it’s 777, or may be we could make the script to send us the file directly , like it does with the html.

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

Sidebar

Related Questions

When I'm developing applications that would be used on client web serves of different
I have often experienced while developing my web applications that pressing F5 or refresh
A web app I'm developing uses lots of asynchronously loaded images that are often
When I'm developing ASP.NET applications I often create forms that allow users to create,
While developing products, we often need to create proprietary tools to test some of
Often I find myself interacting with files in some way but after writing the
I am developing a Java web application that bases it behavior through large XML
Right now I'm developing the prototype of a web application that aggregates large number
I'm developing JS that is used in a web framework, and is frequently mixed
Often, while investigating some code I'm developing, I'll throw in a Console.WriteLine here or

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.