Are you tired of using multiple tools and websites to download files and videos from various platforms? Look no further! We’ve got an exciting solution for you – an all-in-one file and video downloader script that simplifies your downloading experience.
In this article, we’ll explore the features and benefits of this powerful script, and provide you with the source code and template to get started.
What is the All-in-One File and Video Downloader Script?
This script is a versatile tool that allows you to download files and videos from various websites and platforms, including YouTube, Vimeo, Facebook, and many more. With this script, you can:
- Download videos in various formats, including MP4, AVI, and MOV
- Download files from file-sharing websites, such as Dropbox and Google Drive
- Extract audio from videos and save it as an MP3 file
- Convert videos to different formats for compatibility with various devices
Key Features of the Script
- Multi-platform support: Download files and videos from various websites and platforms
- Format flexibility: Download videos in different formats and extract audio as MP3
- Easy to use: Simple and intuitive interface makes it easy to download files and videos
- Fast and reliable: Optimized for speed and reliability, ensuring quick downloads
How to Use the Script
Using the all-in-one file and video downloader script is easy. Simply:
- Download the source code and template from the link below
- Upload the script to your website or server
- Configure the script to suit your needs
- Start downloading files and videos from your favorite websites and platforms
Download the Script
Ready to revolutionize your downloading experience? Click the link below to download the all-in-one file and video downloader script:
Conclusion
The all-in-one file and video downloader script is a game-changer for anyone looking to simplify their downloading experience. With its multi-platform support, format flexibility, and ease of use, this script is a must-have for anyone who downloads files and videos regularly. Download the script today and start enjoying a faster and more convenient downloading experience!
FAQs
Q: Is the script easy to use?
A: Yes, the script has a simple and intuitive interface that makes it easy to download files and videos.
Q: Can I download videos from YouTube?
A: Yes, the script supports video downloads from YouTube and many other platforms.
Q: Is the script fast and reliable?
A: Yes, the script is optimized for speed and reliability, ensuring quick downloads.
Q: Can I customize the script to suit my needs?
A: Yes, the script is highly customizable, allowing you to configure it to suit your specific needs.
Index.html file
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>File Downloader in JavaScript| CodingNepal</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="wrapper">
<header>
<h1>File Downloader</h1>
<p>Paste url of image, video, or pdf to download. This tool is made with vanilla javascript.</p>
</header>
<form action="#">
<input type="url" placeholder="Paste file url" required>
<button>Download File</button>
</form>
</div>
<script src="script.js"></script>
</body>
</html>
Style.css
/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
padding: 0 10px;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #4285F4;
}
.wrapper{
max-width: 500px;
background: #fff;
border-radius: 7px;
padding: 20px 25px 15px;
box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}
header h1{
font-size: 27px;
font-weight: 500;
}
header p{
margin-top: 5px;
font-size: 18px;
color: #474747;
}
form{
margin: 20px 0 27px;
}
form input{
width: 100%;
height: 60px;
outline: none;
padding: 0 17px;
font-size: 19px;
border-radius: 5px;
border: 1px solid #b3b2b2;
transition: 0.1s ease;
}
form input::placeholder{
color: #b3b2b2;
}
form input:focus{
box-shadow: 0 3px 6px rgba(0,0,0,0.13);
}
form button{
width: 100%;
border: none;
opacity: 0.7;
outline: none;
color: #fff;
cursor: pointer;
font-size: 17px;
margin-top: 20px;
padding: 15px 0;
border-radius: 5px;
pointer-events: none;
background: #4285F4;
transition: opacity 0.15s ease;
}
form input:valid ~ button{
opacity: 1;
pointer-events: auto;
}
Script.js
const fileInput = document.querySelector("input"),
downloadBtn = document.querySelector("button");
downloadBtn.addEventListener("click", e => {
e.preventDefault();
downloadBtn.innerText = "Downloading file...";
fetchFile(fileInput.value);
});
function fetchFile(url) {
fetch(url).then(res => res.blob()).then(file => {
let tempUrl = URL.createObjectURL(file);
const aTag = document.createElement("a");
aTag.href = tempUrl;
aTag.download = url.replace(/^.*[\\\/]/, '');
document.body.appendChild(aTag);
aTag.click();
downloadBtn.innerText = "Download File";
URL.revokeObjectURL(tempUrl);
aTag.remove();
}).catch(() => {
alert("Failed to download file!");
downloadBtn.innerText = "Download File";
});
}