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

WBOY
Release: 2016-06-06 20:29:07
Original
1116 people have browsed it

<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>
Copy after login
Copy after login

回复内容:

<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>
Copy after login
Copy after login

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

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template