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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony