View file through HREF with Password in PHP - passwords

I have listed out the Image/PDF files in my server to website through HREF links. When I click a link on the page it will show the Image/PDF file directly on the browser.
But I want to set a password.
After I click the link it should ask the password, then it will show the file on the browser.
Can anyone share your info on this?
Thanks in advance.

Related

How do I add a link inside a PDF document that opens the same PDF in a user's default browser?

A client has asked that I include a "View in browser" link to a pdf attached to an email. This should open the same PDF in the user's default web browser. I have a PDF editor (PDFescape Desktop) that I can successfully use to add links to webpages, and it seems capable of opening files, and even executing javascript, though I've never tried it (I am proficient in JS though so that's an option if anyone has any ideas).
The only thing I can think of is to host the PDF somewhere and then link to it's location, but I'd rather not use a third party server if I can help it.
Is there any way to reference a link in a PDF to the same PDF the link exists in?

This page is trying to load scripts from unauthenticated sources after ssl from sslforfree

I am getting error that
This page is trying to load scripts from unauthenticated sources
after doing SSL from SSL for free
how to solve please help
This usually happens when your page has link href tag connected to a website which doesn't have SSL.
If you want to check these href links:-
On your computer, open Chrome.
Go to your website.
At the top right, click More (vertical triple dots).
Click More tools and then Developer tools.
In the right sidebar, at the top, click Console.
Here you'll see which scripts are trying to load from unauthenticated sources.

password protecting amazon s3 download link in a django template

I have a django template which contains a link to a file stored on amazon s3. This template is an email to be sent automatically from the system. I want this link to be password protected. on clicking this link, the file on s3 in opened in browser without any authentication. I want the user to first log in to my django website and then the file is opened in the website.
How can I achieve this?
Thanks,
Ammara
You would need to have the link in the email use a URL that goes to a view in your site, setup auth normally there, then have the s3 link available from some landing page behind auth on your site.
Just FYI tho: This is a really bad idea if any level of actual security is needed.

How to get direct link of the file from Dropbox Chooser

In the document of Dropbox Chooser we can get a share page url from files[0].link, but we need direct download link. How do I get it?
I found the solution in the forum.
Added data-link-type="direct" attribute for the Dropbox chooser button.
<input type="dropbox-chooser" name="selected-file" data-link-type="direct" style="visibility:hidden"/>

Downloading a file using internet explorer credentials in VB.NET

I want to download a file in VB.net from a website that requires credentials, all my users have their credentials to this website saved in their IE settings.
Is there a way to download a file from this website using the IE credentials? I'm trying to avoid from asking my users for their credentials.
thanks.
Edit: I need to download many files, so i need a way to download the files programmatically.
just invoke this command from Process.Start:
explorer http://www......
this only works if you have the full url of the file you want to download. In case the default browser is not IE you should replace explorer with iexplore