yii2 MinIO

Overview

yii2-minio

Yii2 MinIO

Installation

php composer.phar require bevin1984/yii2-minio:^0.0.1

Or

"bevin1984/yii2-minio": "^0.0.1"

Configuration

'components' => [
    'minio' => [
        'class'=> 'bevin1984\MinioClient',
        'key' => '',
        'secret' => '',
        'endpoint'=> '',
        'region' => '',
        'bucket' => ''
    ],
]

Usage

Writing files

To write file

Yii::$app->minio->write('filename.ext', 'contents');

To write file using stream contents

$stream = fopen('/path/to/somefile.ext', 'r+');
Yii::$app->minio->writeStream('filename.ext', $stream);

Reading files

To read file

$contents = Yii::$app->minio->read('filename.ext');

To retrieve a read-stream

$stream = Yii::$app->minio->readStream('filename.ext');
$contents = stream_get_contents($stream);
fclose($stream);

Saving file

To save file

Yii::$app->minio->save('filename.ext', '/path/to/somefile.ext');

Checking if a file exists

To check if a file exists

$exists = Yii::$app->minio->has('filename.ext');

Deleting files

To delete file

Yii::$app->minio->delete('filename.ext');

Copying files

To copy file

Yii::$app->minio->copy('filename.ext', 'newname.ext');

Renaming files

To rename file

Yii::$app->minio->rename('filename.ext', 'newname.ext');

Getting files mimetype

To get file mimetype

$mimetype = Yii::$app->minio->getMimetype('filename.ext');

Getting files timestamp

To get file timestamp

$timestamp = Yii::$app->minio->getTimestamp('filename.ext');

Getting files size

To get file size

$size = Yii::$app->minio->getSize('filename.ext');

Getting url

To get file url

$url = Yii::$app->minio->getObjectUrl('filename.ext');

To get file presigned url

$url = Yii::$app->minio->getPresignedUrl('filename.ext', 300);
You might also like...
Yii2 console application used to write our processors of methods to responsible to client calling.

Microservice Application Skeleton Yii2 console application used to write our processors of methods to responsible to client calling. This application

Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

Yii2 extension for format inputs based on AutoNumeric.js

Yii2 extension for format inputs based on AutoNumeric.js

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Enhanced Yii2 wrapper for the bootstrap timepicker plugin
Enhanced Yii2 wrapper for the bootstrap timepicker plugin

yii2-widget-timepicker The TimePicker widget allows you to easily select a time for a text input using your mouse or keyboards arrow keys. The widget

An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

yii2-widget-fileinput The FileInput widget is a customized file input widget based on Krajee's Bootstrap FileInput JQuery Plugin. The widget enhances

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

yii2-widget-rangeinput The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default H

OAuth 2.0 Yii2 Extension
OAuth 2.0 Yii2 Extension

OAuth2.0 Extension for Yii2 framework The following clients are currently supported for authorization: vk.com [register your application] mail.ru [reg

A Yii2 module for embedding social plugins and widgets.
A Yii2 module for embedding social plugins and widgets.

yii2-social Module that enables access to social plugins for Yii Framework 2.0. It includes support for embedding plugins from the following networks

Pug Yii2 adapter

Yii 2 Pug (ex Jade) extension This extension provides a view renderer for Pug templates for Yii framework 2.0 applications. Support GutHub issues Inst

GUI manager for RBAC (Role Base Access Control) Yii2. Easy to manage authorization of user

RBAC Manager for Yii 2 GUI manager for RBAC (Role Base Access Control) Yii2. Easy to manage authorization of user 😄 . Documentation Important: If you

Yii2 Gii Extended templates and generators

model template with TimestampBehavior and BlameableBehavior according to columns

This is Yii2 utilities

YII2-UTILITY This is Yii2 utilities. Requirements PHP = 7.4 Curl extension for PHP7 must be enabled. Download Using Composer From your project direct

Alejandro Flores, Php Yii2 Emoac

Prueba Tecnica Emoac Proyecto basado en PHP con Yii2. Hecho por Alejandro Flores, Ingeniero en informática. Este proyecto consta de un CRUD de product

Releases(0.0.1)
Owner
Bevin
Bevin
This package provides a trait to run your tests against a MinIO S3 server.

Laravel MinIO Testing Tools This package provides a trait to run your tests against a MinIO S3 server. ?? Blog post: https://protone.media/en/blog/how

Protone Media 7 Oct 12, 2022
An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)

yii2-widget-alert This extension contains a couple of useful widgets. The Alert widget extends the \yii\bootstrap\Alert widget with more easy styling

Kartik Visweswaran 28 Mar 12, 2022
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

Hafid Mukhlasin 52 Sep 22, 2022
Basic Crud Generator (With Code Files, like GII (YII2)) Using Laravel, Livewire and Tailwind CSS

LiveCrud Live Crud Generator. This package generates Basic Crud with Livewire. Features Generate Complete Crud With Livewire Component and Blade Files

Ritesh Singh 28 Oct 12, 2022
Yii2 Annotations Generate API Document Extension

Generate online api document by code annotation for yii2 easily

Trevor 16 Dec 15, 2021
Tarantool connector for yii2 framework. Allow to use activerecord, schemas, widgets and more.

Tarantool connector for yii2 framework Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, Table

Andrey 11 Nov 21, 2021
Web Push Notifications brought to Yii2

Web Push Notifications for Yii 2 An extension for implementing Web Push Notifications on your website in a breeze. Documentation is at docs/README.md

Mehdi Achour 12 May 19, 2022
yii2-app-advanced with Twitter Bootstrap 5

Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.

Nedarta 1 Nov 5, 2021
Prometheus exporter for Yii2

yii2-prometheus Prometheus Extension for Yii 2 This extension provides a Prometheus exporter component for Yii framework 2.0 applications. This extens

Mehdi Achour 3 Oct 27, 2021
Yii2-symfonymailer - Yii 2 Symfony mailer extension.

Yii Mailer Library - Symfony Mailer Extension This extension provides a Symfony Mailer mail solution for Yii framework 2.0. For license information ch

Yii Software 28 Dec 22, 2022