How to Make a Direct download link of an embedded Video - html

I have a Souce URL of a .MP4 video
here is the URL: http://naruto.manga47.net/Naruto_Dub/040.MP4
to download this video we have to open the link and wait for it to load and then we will be able to
download it by right-clicking on it and saving it as a video.
the Question is That ** I want to get a Direct download link of this video. After pasting the Direct link in a browser it will start downloading the video without any second click**
please tell me if this is even possible.
-Thank You

You can use tag to do this. I suspect somewhere in your code you have an link to this address. Just put a download tag after it like this:
<a href="/download/Naruto_Dub/040.MP4" download>
or like this:
<a href="/download/Naruto_Dub/040.MP4" download="Naruto Video">
and then it will tell the browser to download the file in that link. For more in-depth info read here: https://www.w3schools.com/tags/att_a_download.asp
EDIT: Chrome 65+ and Firefox only support same-origin download links, due to security reasons. You would need to download the file yourself, and put it somewhere on your website and then link it to your own website.

So basically you have a direct link of a file on internet, That is this : http://naruto.manga47.net/Naruto_Dub/040.MP4
the easiest thing you can do is just add ?dl=1 at last in the link in order to download it.
Now the link will be :
http://naruto.manga47.net/Naruto_Dub/040.MP4?dl=1

Related

is it possible to make an hyperlink to only download a pdf file?

I have an hyperlink to a pdf form that can not be opened by the browser's pdf viewer. If clicked, the browser tries to show it but I get the error message like "it is necessary Acrobat Reader 8.x" etc. Is there a way to force an hyperlink to such pdf form file to only allow its downloading? In this way, the user could open it with his local Adobe Reader.
Let’s say you have a PDF that you want to let people download. The file will be like this:
Download Receipt
In most browsers, clicking on the link will open the file directly in the browser.
But, if you add the download attribute to the link, it will tell the browser to download the file instead.
<a href="/path/to/your/receipt.pdf" download>Download Receipt</a>
The download attribute works in all modern browsers, including MS Edge, but not Internet Explorer.
In the latest versions of Chrome, you cannot download cross-origin files (they have to be hosted on the same domain).
To make the hyperlink to download the pdf file when clicked, you should use download property inside the anchor tag. For example you can see the code below:
Download the pdf file
You can also give your own name to the downloadable pdf file in the download property that I provided as 'Document' in the code above.
Yes, it is possible. First download the file and then you'll see a link when it downloaded(it disappears quite quickly) just copy it and use:
hyperlink

How do I make the download attribute work without redirecting?

I am trying to create a link to an mp3 file that fires off a download. However the download attribute is ignored and the browser just redirects instead. It works with text files but not mp3 files? Please advise, thanks.
Download Text

How to make HTML Link which makes the user download an .html file

The following code will make the user download the .doc file
Download
I want to create a link that will let user to download .html file
Any Ideas how to do it....???
You can add a download atributte to the <a> tag.
We'll get something like this:
<a href="file.html" download>Download</a>
Note: The download attribute IS NOT supported in Internet Explorer.In this case, it's better to zip the html file (add it into a .rar or a .zip, WinRAR can do this) and link it.
It'll be: Click me
I guess the easiest way to provide a .html file for download to a user would be to put it in a .zip or .rar format.
You can use the HTML5 Download attribute in the anchor tag.
Download attribute signifies that the resource it points to should be downloaded by the browser instead of navigating to it.
<a href="myfile.html" download> Download HTML file </a>
or, you can specify a name of the downloadable file by yourself
Download with specified name
Not all browsers support this HTML5 attribute, here is the detail of where it will work.

How can I make a url a download link in html?

A client wants a url to be a download link.
Use case is like so:
user gets linked to example.com/download once there, it downloads a pdf file.
Can I do this without php ?
HTML5 introduced the download attribute.
Supporting user-agents will offer to download the file foo.png when clicking this link:
<a href="foo.png" download>Save the image</a>
You can also specify a different default file name that should be used:
<a href="foo.png" download="image.png>Save the image</a>
Read more at http://www.w3.org/TR/html5/links.html#downloading-resources.
Note that this only works for links. When users enter the URL directly into their browsers, this will have no effect, of course. If you want that, you need to send specific HTTP headers. See for example the question: How to force download of a file?. You don’t necessarily need a programming language like PHP for that. You can do it with, for example, .htaccess, too: Force File(image) Download with .htaccess
How a file is displayed is browser specific. Some may force you to download while some directly render it on the browser.
If you want to force the browser to download the file then you can set in Header the
Content-Type : application/octet-stream
You only need a link (anchor tag). The way the link behaves on click will depend on what browser you are and what settings you have in that particular browser. Some browsers will prompt you to open or save the file, other browsers will open the PDF file on a new tab or window.
Download PDF
You'll also need to make sure that the path to the PDF file is correct on the href property of your anchor tag.
Use this (HTML) not PHP:
Download pdf
Use the full url including the pdf file like.
Download

Chrome mediaelement.js stream and download link conflict

I'm having trouble getting audio streams and download links (for the same file) to play nice on a page in Chrome.
http://500mixes.com
For each audio file, I have a separate player and download link. The player is mediaelement.js. The problem is that clicking on the download button stops the stream. But the opposite (download, then stream) works fine.
I know one solution would be to use a modal pop-up to pull the download link out of the page. But I'm hoping to find an inline solution. Does mediaelement.js have native download functionality?
Thanks!
I haven't looked at your code yet, so this assumes you aren't doing anything strange...
If you link to a download, the browser will often begin the process of shutting down the current page in order to go to the next page. This is a reasonable optimization, since most links are pointing to other pages, not downloads.
To get around this, set the target of your download links to _blank. This opens the download link in a new window. Note that a simple modal dialog on the same page will not work. You must set the target to somewhere else.
Alternatively, add a hidden <iframe> to your page and set the target of those download links to it.
I have been having the same problem, the download link shows but is not clickable. Simply adding target="_blank" within the URL makes the link clickable and makes the file downloadable. Thanks.