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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:24:19+00:00 2026-05-26T00:24:19+00:00

I have written a script to upload an image to a particular portion of

  • 0

I have written a script to upload an image to a particular portion of my site.

What kind of check do I need to do to detect if a duplicate entry is trying to be uploaded through the form?

Example:
One user submits firefoxlogo.jpg.
Another user a few days later tries submitting firefox.jpg which is the same image, just renamed.

  • 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-26T00:24:20+00:00Added an answer on May 26, 2026 at 12:24 am

    …the same image…

    The same as “the binary data is identical” or “the image looks similar”? In the first case, you can calculate the hash of a file using sha1_file (for SHA1 hashes). You should never rely on the filename for checking whether files are unique or not. E.g. one user could upload “firefox.png” containing the browser’s logo and someone else a screenshot of it. The hash has a fixed length (40 for SHA1) which is another advantage over using filenames.

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

Sidebar

Related Questions

I have written a basic script for the mail functionality. I am trying to
I have written a simple file upload script but it gives me the error
I have written a script image.php that is quite long, but I've just copied
I have written a pretty basic upload script that takes the file and uploads
I have written a script which works, but I'm guessing isn't the most efficient.
I'm using emacs and I have written a script which uses current-buffer. However the
So I have a strange question. I have written a script that re-formats data
I have written a python script which watches a directory for new subdirectories, and
I have written a Perl script, I just want to give it to every
I have written a python script with methods in it. Now I want to

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.