llpddone/selectel-transmitter

0.0.1 2023-05-27 18:37 UTC

This package is not auto-updated.

Last update: 2024-10-27 01:32:19 UTC


README

File transmitter to selectel (S3 object storage).

Installation

This project using composer.

$ composer require llpddone/selectel-transmitter

Run

$ php artisan vendor:publish

Use

$file = $request->file('YOUR_KEY');
 
$outputFileName = time();
$inputExtension = $file->extension();
$inputFileName = $file->getFilename()

SelectelTransmitter::saveFile(
    inputPath: '/tmp',
    inputFileName: 'fileName',
    outputFileName: $outputFileName . '.' . $inputExtension
);

Fill in the properties in .env according to the keys from the config or change the configuration.