Home  >  Article  >  Backend Development  >  七牛上传图不能预处理图片 上传完成后还是原始图片

七牛上传图不能预处理图片 上传完成后还是原始图片

WBOY
WBOYOriginal
2016-06-06 20:29:071120browse

<code>    $putPolicy = new Qiniu_RS_PutPolicy($bucket);
    $putPolicy->Scope = "$bucket:123.png";
    $putPolicy->PersistentOps = "imageView2/2/h/1000";
    $putPolicy->PersistentPipeline = "";
    $putPolicy->MimeLimit = "image/*";
    $upTokenimg = $putPolicy->Token(null);
    
    
    成功传好图片却没有执行预处理 就直接上传完成了</code>

回复内容:

<code>    $putPolicy = new Qiniu_RS_PutPolicy($bucket);
    $putPolicy->Scope = "$bucket:123.png";
    $putPolicy->PersistentOps = "imageView2/2/h/1000";
    $putPolicy->PersistentPipeline = "";
    $putPolicy->MimeLimit = "image/*";
    $upTokenimg = $putPolicy->Token(null);
    
    
    成功传好图片却没有执行预处理 就直接上传完成了</code>

必须处理了,你打印一下七牛响应的response信息,拿到 id(persistentId)

然后 http://api.qiniu.com/status/get/prefop?id=

id填上,就可以获取到处理后图片的文件名,可以在你空间里面检索搜到。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn