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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:13:51+00:00 2026-05-30T17:13:51+00:00

I am developing a database driven web app. and there is a cell that

  • 0

I am developing a database driven web app. and there is a cell that users can enter any image url or string as input.
is there a function that, image url / string seperation and if it is image, checks for existence.
I need to do that, if a user entered an image url then image is going to show into app (if exists), otherwise if user entered a string (message) then message is going to placed into app.

Just for demonstration;

function check_imageornot(data){
    ...........
    if -> image && exist -> return 'image_ok';
    if -> image && not_exist -> return 'image_no';
    if -> string -> return 'string';
    }
}

NOTE: This function will be put into .js file so Javascript/jQuery way is needed (can be regex way in JS/jQuery too…)

  • 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-30T17:13:52+00:00Added an answer on May 30, 2026 at 5:13 pm

    You can’t tell if a file is an image just by looking at its name (or its URL). If you’re talking about a local file, you could use HTML5 file manipulation tools to open the file and sniff its contents. If the URL could be for a file anywhere on the Internet, however, you’ll have to send the URL to your server and have it figure out what it is.

    edit — @GGG has an interesting idea in a comment.

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

Sidebar

Related Questions

I'm developing a site that's pretty lightweight on the interface and mostly database driven
I am developing a web database that is already in use for about a
We are developing an open source and free large scale database driven web application.
I'm developing a database-driven web application. I'm not always connected to the network so
The Plan: I'm developing an android application that is heavily database driven (as in,
I have a question about a site I'm developing. It is a database driven
I am developing a database-like application that stores a a structure containing: struct Dictionary
I'm developing an Access 2003 Database that uses a MS SQLServer backend. I'm trying
I am currently developing a very simple database that tracks people and the company
What is the best way for developing a database based application? We can have

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.