Skip to content

Files

Latest commit

May 28, 2018
c2be4a9 · May 28, 2018

History

History
40 lines (36 loc) · 826 Bytes

README.md

File metadata and controls

40 lines (36 loc) · 826 Bytes

ali-oss-uploader

auto upload static file to aliyun oss

how to use

1. install

composer require wangshixiang/alioss-uploader

2. config

<?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. run

php index.php