toroscloud / phpsdk
Integration with toros.com.br
This package is not auto-updated.
Last update: 2024-10-17 11:41:52 UTC
README
We are the first Brazilian cloud company to offer blockchain file storage
Exemple PHP
<?php
require_once 'vendor/autoload.php';
use Toros\Toros as TOROS;
$API_KEY = ""; $API_SECRET = "";
$api = new TOROS($API_KEY,$API_SECRET);
//New bucket $return = $api->newBucket('namebucket'); print_r($return);
//Delete bucket $return = $api->delBucket('namebucket'); print_r($return);
//Upload file $name_bucket = 'namebucket'; $file_origin = 'origin_file.png'; $file_destiny = 'directory/destiny_file.png'; $return = $api->upload($name_bucket, $file_origin, $file_destiny); print_r($return);
//Delete file $name_bucket = 'namebucket'; $file_destiny = 'directory/destiny_file.png'; $return = $api->delete($name_bucket, $file_destiny); print_r($return);
//Get list file $name_bucket = 'namebucket'; $file_destiny = 'directory'; $return = $api->list($name_bucket, $file_destiny); print_r($return);
//Download file $name_bucket = 'namebucket'; $file = 'directory/destiny_file.png'; $file_local = '/home/user/file/vaiiii2.png'; $return = $api->download($name_bucket, $file,$file_local);