wangshixiang / alioss-uploader

阿里云OSS静态文件上传器

0.0.5 2018-08-23 08:05 UTC

This package is not auto-updated.

Last update: 2024-09-27 12:01:40 UTC


README

自动上传静态文件到阿里云OSS

如何使用

1. 安装

composer require wangshixiang/alioss-uploader

2. 配置

<?php
include_once 'vendor/autoload.php';
use wangshixiang\alioss_uploader\lib\Main;
$main = new Main([
    'accessKeyId' => '',
    'accessKeySecret' => '',
    'endpoint' => '',
    'bucket' => '',
    'oss_basepath' => '',//'','app/' the base dir you want to upload to,empty for root path
    'ignore' => [
        '.git',
        '.idea',
        'bower_components',
        '.gitignore',
        'bower.json',
    ],// ignore path or file
    'source' => 'C:\Users\Administrator\Desktop\wuliu',
    'uploadList' => [
        'test.txt'
    ]//white list,upload list item only,empty for all file
]);
$main->run();

3. 运行

php index.php