多文件压缩:execute fop cmd failed

问题描述

  1. 使用 https://developer.qiniu.com/d... 接口,报错如下http://api.qiniu.com/status/g...

问题出现的环境背景及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

        $qiniuDir = config('filesystems.courseware');
        $key = "test.txt";
        $zipKey = "$qiniuDir/{$cp->zip_name}_test.zip"; // 压缩后的key TODO: _test 后面需要移除
        $bucket = getenv('QINIU_OSS_BUCKET_NAME');
        $notify_url = null;
        $force = false;
        $pipeline = 'queue-www-gy720-com'; // 异步任务的队列, 去后台新建: https://portal.qiniu.com/mps/pipeline
        $urls = $this->getUrls($cp->json_config_original);
        $fops = $this->getFops($urls, $zipKey, $bucket);
//dd($bucket, $key, $pipeline, $notify_url, $force);
        list($id, $err) = $this->getPfop()->execute($bucket, $key, $fops, $pipeline, $notify_url, $force);

        echo "\n====> pfop mkzip result: \n";
        if ($err != null) {
            var_dump($err);
        } else {
            echo "PersistentFop Id: $id\n";

            $res = "http://api.qiniu.com/status/get/prefop?id=$id";
            echo "Processing result: $res";
        }

你期待的结果是什么?实际看到的错误信息又是什么?

  1. 错误信息: execute fop cmd failed: source data is empty or fail to get source data
  2. $pipeline 从哪里来的?
阅读 1.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题