display image on secure https website from local computer gives security warning

when uploading a photo ina form on a website, I let the user view the photo being uploaded, therefore it takes the image as c:/image.jpg which appears not to be secure, and I get a dialog box asking me if I want to continue with the unsecure items, once this happends my websit is no longer secure.... is there a way to fix this ?
Who is Participating?
Göran AnderssonConnect With a Mentor Commented:
No. A web page needs to fetch all it's contents using https to be secure. You can't use https to get an image from the local computer, so there is no way that you can do this and keep the page secure.

How about a popup window to show the image? You might get a warning that you are navigating to an unsecure location, but the main page would still be secure.
bdipasqualeAuthor Commented:
ok in that case in php could I detect if im in a secure environment or not ?
Sinoj SebastianConnect With a Mentor CTO & OpenERP Project managerCommented:
     if($_SERVER['HTTPS'] == on)
Göran AnderssonCommented:
Recommendation: Split between #20384304 and #20384540
Forced accept.

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.