File "upload_mgr_init.php"

Full Path: /www/wwwroot/shphe-en.com/admin/extend/vendor/qiniu/php-sdk/examples/upload_mgr_init.php
File size: 431 bytes
MIME-type: --
Charset: utf-8

<?php
require_once __DIR__ . '/../autoload.php';

use Qiniu\Auth;
use Qiniu\Storage\UploadManager;

$accessKey = 'Access_Key';
$secretKey = 'Secret_Key';
$auth = new Auth($accessKey, $secretKey);

// 空间名  http://developer.qiniu.com/docs/v6/api/overview/concepts.html#bucket
$bucket = 'Bucket_Name';

// 生成上传Token
$token = $auth->uploadToken($bucket);

// 构建 UploadManager 对象
$uploadMgr = new UploadManager();