Giter Site home page Giter Site logo

schneidermr / utopia-php-storage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from utopia-php/storage

0.0 0.0 0.0 37.08 MB

Lite & fast micro PHP storage library that is **easy to use**.

Home Page: https://appwrite.io

License: MIT License

PHP 97.23% Dockerfile 2.77%

utopia-php-storage's Introduction

Utopia Storage

Build Status Total Downloads Discord

Utopia Storage library is simple and lite library for managing application storage. It supports multiple storage adapters. We already support AWS S3 storage, Digitalocean Spaces storage, Backblaze B2 Cloud storage, Linode Object storage and Wasabi Cloud storage. This library is aiming to be as simple and easy to learn and use. This library is maintained by the Appwrite team.

This library is part of the Utopia Framework project.

Getting Started

Install using composer:

composer require utopia-php/storage
<?php

require_once '../vendor/autoload.php';

use Utopia\Storage\Storage;
use Utopia\Storage\Device\Local
use Utopia\Storage\Device\S3
use Utopia\Storage\Device\DOSpaces

// Instantiating local storage
Storage::setDevice('files', new Local('path'));

// Or you can use AWS S3 storage
Storage::setDevice('files', new S3('path', AWS_ACCESS_KEY, AWS_SECRET_KEY,AWS_BUCKET_NAME, AWS_REGION, AWS_ACL_FLAG));

// Or you can use DigitalOcean Spaces storage
Storage::setDevice('files', new DOSpaces('path', DO_SPACES_ACCESS_KEY, DO_SPACES_SECRET_KEY, DO_SPACES_BUCKET_NAME, DO_SPACES_REGION, AWS_ACL_FLAG));

$device = Storage::getDevice('files');

//upload
$device->upload('file.png','path');

//delete
$device->delete('path');

System Requirements

Utopia Framework requires PHP 7.4 or later. We recommend using the latest PHP version whenever possible.

Copyright and license

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php

utopia-php-storage's People

Contributors

lohanidamodar avatar christyjacob4 avatar eldadfux avatar everly-gif avatar fogelito avatar torstendittmann avatar meldiron avatar abnegate avatar unickorn avatar shimonewman avatar mattschlosser avatar nimocat avatar mohitcharkha avatar precious-void avatar avats-dev avatar loks0n avatar schneidermr avatar prerakmathur20 avatar abhishekdd avatar metadaddy avatar stnguyen90 avatar kraizan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.