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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:56:37+00:00 2026-05-16T10:56:37+00:00

In my website, the user can upload a profile image. The website structure is

  • 0

In my website, the user can upload a profile image. The website structure is as follows:

C:\xampp\htdocs
C:\xampp\upload\user1

For security reason, the upload file has been moved into folder C:\xampp\upload\user1\.

The question is how I can serve this image later to the user. In other words, after uploading the image, the user should be able to see the upload image on the web page. What should I do?

Here is what I can figure out

  1. Introduce a new folder C:\xampp\htdocs\picture\randomimagename
    which is used to temporarily save the user’s picture.
  2. Use the link to C:\xampp\htdocs\picture\randomimagename and serve it to the user.

Now the problem is when should I delete this image?

  1. when the user logouts out. yes, I know how to do this.
  2. when the user closes the browser. how do I know this?
  3. any other cases.
  • 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-16T10:56:37+00:00Added an answer on May 16, 2026 at 10:56 am

    Save the image to C:\xampp\htdocs\picture\randomimagename and then every once in a while, have a Windows Scheduled Task clean it out (e.g. when it’s been more than 15 minutes since it was created).

    That way you don’t have to worry about doing it when the user logs out, or when the user closes the browser, or anything else. Tweak how frequently the job runs depending on how much you care about disk space vs how much you care about CPU usage/IO.

    By the way, I hope you’re not doing things like:

    <img src="C:\xampp\htdocs\picture\randomimagename.jpg" />
    

    that will only work when run on the server which Apache is running on. You want to use a proper path, relative to your site’s root.

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

Sidebar

Related Questions

On a website if I have a form where the user can input some
On my website I want a small flash banner which the user can activate
I'm creating a user-based website. For each user, I'll need a few MySQL tables
I once knew a website where the user could generate the little W3C valid
Say a user is browsing a website, and then performs some action which changes
I've developed my website that checks if the user is registered and creates a
I have an website. When the user is logged the session details will loaded.
I have an asp.net website that allows the user to download largish files -
i want something like this the user enter a website link i need check
I have a website with a contact form. User submits name, email and message

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.