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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:54:47+00:00 2026-06-09T08:54:47+00:00

In our web applications we struggle with a problem reoccurring constantly. An easy example

  • 0

In our web applications we struggle with a problem reoccurring constantly. An easy example is a blog post: it has a title, lead & body text and an image. Our UX designers would like to let users upload the image asynchronously. This becomes an issue when you want to create a new post. It isn’t persisted yet, so there is no id (for example when you use the id for the path of the image) or you can’t put the location of the image as column in the database.

We could create a “tmp” folder for blog posts to which a user uploads an image: but what would you do when the user never persists the post? Or when s/he comes back? What if another user uploads an image to create a new post too?

Is there any good practice around this problem? Our apps are written in php, but I think this doesn’t really matter for the subject.

  • 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-09T08:54:48+00:00Added an answer on June 9, 2026 at 8:54 am

    Although we use S3 for file storage, the concept works the same;

    1. Create an entry in the app’s database for the upload with a null reference. The reference to the entry gets sent back to the form and is posted along with it when the user is ready to submit.

    2. A cron runs periodically and removes any uploads/records where the reference is null after X number of hours.

    Doing it this way means you can easily deploy your app across multiple front-ends without having to worry about where the file may be.

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

Sidebar

Related Questions

Our application is a 3 tier one. It has 3 ASP.NET web applications talking
Currently we run our web applications on a thin client browser IE 6 and
I would like to have our web applications pull static content (css, js, images)
At my company, we have tiered environment for our web applications (development, staging, production).
We are trying to remove the global.asax from our many web applications in favor
I have just re-written the authentication for one of our internal web applications to
Requirement is this ... We have our 3 web-applications deployed in RHEL-5 server, we
In our web application, we have multiple small applications availables. Let us say A,B,C.
We are currently developing a few web applications and are letting our designers convert
Our codebase where I work is .NET 2.0. For our new assembly/DLLs/web applications I

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.