1.0.5 • Published 1 year ago

satyajit_med_downloader v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

satyajit_med_downloader

Media file downloader - a complete solution to download images,videos,PDFS and audio file hassle free

Installation

You can install the Satyajit Media Downloader package via npm. Run the following command in your terminal:

npm install satyajit_med_downloader

downloadFile is a function who takes two argument downloadFile("url","location to download the files")

Important "type": "module" will cause . js files to be interpreted as ES modules. so make sure you have added this line to your package.json file

How to use

  • to download the image
import { downloadFile } from 'satyajit_med_downloader';

// Example: Download an image
downloadFile('https://example.com/image.jpg', './image')
  .then(() => console.log('Image downloaded successfully'))
  .catch((error) => console.error('Error downloading image:', error));
  • to download the video
// Example: Download a video
import { downloadFile } from 'satyajit_med_downloader';
downloadFile('https://example.com/video.mp4', './video')
  .then(() => console.log('Video downloaded successfully'))
  .catch((error) => console.error('Error downloading video:', error));
  • to download the PDF
// Example: Download a PDF
import { downloadFile } from 'satyajit_med_downloader';
downloadFile('https://example.com/document.pdf', './document')
  .then(() => console.log('PDF downloaded successfully'))
  .catch((error) => console.error('Error downloading PDF:', error));

Author : Satyajit Rakhunde

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago