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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:52:17+00:00 2026-06-16T04:52:17+00:00

Actually this is about a cloud storage web app A web app where user

  • 0

Actually this is about a cloud storage web app

A web app where user have their own private folder and i want they should have their own folders too .What could be the best way, to tell uploader that the file being uploaded has to be in specific folder in which user is in.

So what i thought is whenever a folder is created and opened a session which stores folder name is started and sent to uploader where Uploader that way uploads.

For eg $_SESSION['folder-name']='x'

$upload_dir= "/$_SESSION['username']/$_SESSION['folder-name']/"

Every user has specific private directory where they can upload files. So there is no chance that session can be manipulated to upload in wrong user directory.

Since now i see this way as the best way, is there any alternative i can get from stackoverflow community on this . if yes, please describe

  • 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-16T04:52:18+00:00Added an answer on June 16, 2026 at 4:52 am

    Since your username is unique I suppose then I seems legit.
    But lets see this scenario:

    A user get’s deleted and another one registers with the same username…

    EDIT

    It depends on the fs and many other factors. Eg is this going to be url accessible ?

    An legit alternative could be:

    Since the username as you set it seems to be unique then you could first md5 it (is quick) and then digest to hex if you want it shorter and url accessible. That will give you a good number of usernames that can be converted to folders.

    Bad thing about this is that you can’t find the user by the folder name. If you had that in mind

    That’s it.

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

Sidebar

Related Questions

This question is more about guidance than actually solving my problem: I need to
i have a very simple question, actually this is not the question, this is
I m Using a calendar.js file to implement calendar in my App. Actually this
I have seen code like this (actually seeing another person type it up): catch
still trying to get my DataGrid go faster, I have a question about this:
i'm asking about htaccess url rewrite ( mod_rewrite ) actually i want to change
I have actually this little function working as supposed: Function createAttached(strTable As String, strPath
I have a Play! web application. If the user is logged in, I would
I've actually asked about this already in this post although we've gone back to
This is actually a question about this question: Adding a directory to $LOAD_PATH (Ruby)

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.