Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Parallel Downloader Bundle Laravel Package

amarkhai/parallel-downloader-bundle

View on GitHub
Deep Wiki
Context7

The Symfony bundle for concurrent downloading files by Guzzle

Installation

composer require amarkhai/parallel-downloader-bundle

Usage

For downloading run method "download" with an array<string, string>, where value is the link for file which you need to download and key is the name which will be used for saving the file:

    public function __construct(DownloadManager $downloadManager)
    {
        $this->downloadManager = $downloadManager;
    }
    
    public function foo()
    {
        $this->downloadManager->download([
            'filename1' => 'https://mysite.com/test1.png',
            'filename2' => 'https://mysite.com/test2.png',
            'filename3' => 'https://mysite.com/test3.png',
        ]);
    }

Additional parameters

The method download has 2 additional parameters:

  • subFolder - the name of folder inside download folder (see below) where files from the list will be saved
  • options - Array of Guzzle request options to apply to each request.

Configuration

It's possible to change some parameters in configuration files:

  • Folder for saving files
  • Quantity of retries after failure downloadings
  • Maximum number of requests to send concurrently

Here are default values for these parameters:

# config/packages/amarkhai_parallel_downloader.yaml
parameters:
  amarkhai_parallel_downloader.download_files_folder: '%kernel.project_dir%/var/downloads'
  amarkhai_parallel_downloader.download_retry: 3
  amarkhai_parallel_downloader.download_concurrency: 10
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity