toroscloud/phpsdk

与toros.com.br集成

dev-master 2020-09-08 21:34 UTC

This package is not auto-updated.

Last update: 2024-10-03 11:31:47 UTC


README

N|Solid

我们是第一家提供区块链文件存储的巴西云公司

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);

www.toros.com.br