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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:42:27+00:00 2026-05-17T22:42:27+00:00

I am having an upload image system. You upload a image, then you crop

  • 0

I am having an upload image system.

You upload a image, then you crop it and press save.

If you cancel this procedure at after you uploaded the image, the image will remain on the server.

So therefore i tried my idea of making a column in db called “failImage”, so when you upload the image, it stores the filename e.g 1111.jpg in the column.

So later if you cancel this procedure either by shutting down the website or something else, next time you visit, I made a function that checks if failImage is empty.

If it isn’t then it deletes (unlink) the value in failImage(which is in this example 1111.jpg) and emptys the failImage column.

This works fine.

But…if you have two windows of my site, and on the 1)st one you upload a image, and then at the 2nd one you refresh the window(f5) the function i made, that unlink the value in failImage runs, and will then occur an error to the previous window you have open, when you try to crop and save it, as it says no such file or directory, as the second window has removed the image you were working with.

I have thought of an solution to this for some time, is there any way I can solve 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-17T22:42:28+00:00Added an answer on May 17, 2026 at 10:42 pm

    You can make this process much more simple and less error prown, if you split it into two steps.

    1. Step: User uploads an image, which is saved in user-account.

    2. Step: User can select already uploaded image(s) and crop it/them.

    You keep the two steps strictly separated but in order to keep up good usability, you don’t show the two steps to the user. If step 1 completes successfully, you automatically invoke step 2.

    Advantages:

    • If step 2 failes, user can invoke it any time manually.
    • No need for complicated and error prown mechanisms as you describe them involving the DB.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a queue-based system to scale user-uploaded images. Users will upload images which
We're having problems with an ASP.NET application which allows users to upload, and crop
I am having a hard time with my image upload script, getting the images
I'm trying to create a WP7 application that will upload an image to my
I am having problem uploading image to mongodb using rails and carrierwave. This is
I am creating an AJAX PHP upload script, but I am having troubles. After
Does anybody know if there is a way of having an image upload field
I am having problems with django forms and image uploads. I have googled, read
We're having a significant number of problems creating a bulk upload function for our
I'm having problem with Rails plugin attachment_fu . On every upload, I get validation

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.