承接 dam-bal/vercel-blob-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dam-bal/vercel-blob-php

最新稳定版本:1.0.1

Composer 安装命令:

composer require dam-bal/vercel-blob-php

包简介

PHP Client for Vercel Blob

README 文档

README

PHP Client for Vercel Blob Storage.

Vercel Blob

Install

composer require dam-bal/vercel-blob-php

Usage

Creating Client

$client = new \VercelBlobPhp\Client();

Client constructor accepts token for blob storage, but if you connected your blob storage to project then you don't need to set it.

Using Client

PUT

$result = $client->put(
    path: 'test.txt',   // path
    content: 'hello world' // content,
    options: new \VercelBlobPhp\CommonCreateBlobOptions(
        addRandomSuffix: true,      // optional
        contentType: 'text',        // optional
        cacheControlMaxAge: 123,    // optional
    )
);

Options argument is optional.

DEL

$client->del(['test.txt']);

COPY

$result = $client->copy(
    fromUrl: 'fromUrl',
    toPathname: 'toPathname',
    options: new \VercelBlobPhp\CommonCreateBlobOptions(
        addRandomSuffix: true,      // optional
        contentType: 'text',        // optional
        cacheControlMaxAge: 123,    // optional
    )
);

HEAD

$result = $client->head('url');

LIST

$result = $client->list(
    options: new \VercelBlobPhp\ListCommandOptions(
        limit: 100, // optional
        cursor: 'cursor', // optional
        mode: \VercelBlobPhp\ListCommandMode::EXPANDED, // optional
        prefix: 'prefix', // optional
    )
);

Options argument is optional.

统计信息

  • 总下载量: 284
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-19