upyun / php-sdk Goto Github PK
View Code? Open in Web Editor NEWUPYUN SDK for PHPer
License: MIT License
UPYUN SDK for PHPer
License: MIT License
目录带#,解析会出错
非CDN空间。
每次去后台缓存刷新,很麻烦。
希望通过api方式来请求。谢谢!
参见 Flysystem
Flysystem is a filesystem abstraction which allows you to easily swap out a local filesystem for a remote one. Technical debt is reduced as is the chance of vendor lock-in.
Goals
https://docs.upyun.com/ai/audit_nostorage/#url 这里的接口在SDK里有封装吗?
如何实现删除一个内容不为空的文件夹?只能通过回去列表删除获取列表删除的形式吗?
异步云处理处理接口必须提供 $source,$tasks
但是压缩解压缩没有$source参数,他们都包含在tasks中,请问这个参数怎么传合适?
/**
* 异步云处理
*
* 该方法是基于[又拍云云处理](http://docs.upyun.com/cloud/) 服务实现,可以实现音视频的转码、切片、剪辑;文件的压缩解压缩;文件拉取功能
*
* 注意:
* - 所有需要调用该方法处理的资源,必须已经上传到云存储服务
* - 使用 `process` 之前,必须配置 `config->processNotifyUrl`,否则会提交任务失败
*
* 例如视频转码:
* ```
* process($source, array(
* array(
* 'type' => 'video', // video 表示视频任务, audio 表示音频任务
* 'avopts' => '/s/240p(4:3)/as/1/r/30', // 处理参数,`s` 表示输出的分辨率,`r` 表示视频帧率,`as` 表示是否自动调整分辨率
* 'save_as' => '/video/240/new.mp4', // 新视频在又拍云存储的保存路径
* ),
* ... // 同时还可以添加其他任务
* ))
* ```
*
* @param string $source 需要预处理的图片、音视频资源在又拍云存储的路径
* @param array $tasks 需要处理的任务
*
* @return array 任务 ID,提交了多少任务,便会返回多少任务 ID,与提交任务的顺序保持一致。可以通过任务 ID 查询处理进度。格式如下:
* ```
* array(
* '35f0148d414a688a275bf915ba7cebb2',
* '98adbaa52b2f63d6d7f327a0ff223348',
* )
* ```
*/
public function process($source, $tasks)
{
$video = new Api\Pretreat($this->config);
return $video->process($source, $tasks);
}
使用文件流方式上传的时候,会导致文件的每一个0x0D的后面再多了一个0x0D,使文件改变,直接使用FTP下载得到的文件是错误的,但使用readFile方法得到的文件又是正确的.
目前使用的似乎是这个旧的签名方法:http://docs.upyun.com/api/form_api/#_9 ,并没有找到文档中推荐的新的签名方法
加一下异步回调的接口验证
循环移动文件也忒麻烦了
这个必须得有呀!..
新增了composer支持,但是似乎无法调用?
看上去是没有namespace的问题
➜ antic-api php -d memory_limit=-1 /usr/local/bin/composer require upyun/sdk
Using version ^3.5 for upyun/sdk
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.0.1].
- Can only install one of: guzzlehttp/guzzle[7.0.1, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.0.1].
- upyun/sdk 3.5.0 requires guzzlehttp/guzzle ~6.0 -> satisfiable by guzzlehttp/guzzle[6.5.x-dev].
- Installation request for upyun/sdk ^3.5 -> satisfiable by upyun/sdk[3.5.0].
- Installation request for guzzlehttp/guzzle (locked at 7.0.1, required as ^7.0.1) -> satisfiable by guzzlehttp/guzzle[7.0.1].
Installation failed, reverting ./composer.json to its original content.
➜ antic-api
3.0的并未更新到composer吧?
process方法在注释中写有异步拉取功能,但是不知道怎么用
Upyun\Api\Multi的第83行,$this->blockSize应该是$this->config->maxBlockSize。
RT
使用该文件write函数,如果上传一个图片文件,不添加异步图片处理的时候是正常的
但是添加了异步图片处理时(生成缩略图),会报错找不到处理文件
Hi — I have a project that (one day might) need to have an agile CDN and/or compute core out of mainland China. I found your site via GitCafe.
But it seems I cannot sign up due to my phone number, as I tried:
+1 415 000 0000
+1 (415) 000-0000
00 1 415 000 0000
001 ...
It appears the offending regex is:
ng-pattern="/^(1(([358][0-9])|(47)|[8][01236789]))\d{8}$/"
Do you allow international customers?
[ I'm also not sure what "..QQ" is, Google can't translate it. ]
可以支持视频上传功能吗
sdk 没有解决大文件上传的断点续传功能吗?
https://github.com/upyun/php-sdk/blob/master/src/Upyun/Upyun.php#L380
type 应该是 PROCESS_TYPE_CONVERT 不是 PROCESS_TYPE_SYNC_FILE。
@sabakugaara
有几个问题 (主要是大文件,流的操作, 要不然 php会爆的)
环境:laravel 5
安装方式:composer require upyun/sdk
错误:Class 'Upyun\Config' not found
$res = $upyun->usage('/');
$res = $upyun->usage('/test/test');
得到的结果是一样的
目前,文档生成是通过 php vendor/bin/phpdoc -d src -t docs
,得到 html 格式的文档,需要转化成 markdown 格式,便于 github 展示
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.