【已解决】hu60wap6 上传文件失败(aliyunoss)

@Ta 2023-04-13发布,2023-04-13修改 7016点击

接口 /q.php/api.upload-form.json 响应如下:

    "error": "true",
    "errInfo": {
        "code": 0,
        "message": ":  RequestId: 6437585F051F6835322341E6",
        "file": "phar:///app/hu60wap6/src/nonfree/class/AliyunOss.phar/src/OSS/Result/Result.php",
        "line": 97,
        "trace": "#0 phar:///app/hu60wap6/src/nonfree/class/AliyunOss.phar/src/OSS/Result/Result.php(28): OSS\\Result\\Result->parseResponse()\n#1 phar:///app/hu60wap6/src/nonfree/class/AliyunOss.phar/src/OSS/OssClient.php(2051): OSS\\Result\\Result->__construct()\n#2 /app/hu60wap6/src/class/CloudStorageAliyun.php(49): OSS\\OssClient->doesObjectExist()\n#3 /app/hu60wap6/src/class/CloudStorageBase.php(62): CloudStorageAliyun->getUploadForm()\n#4 /app/hu60wap6/src/page/api/upload-form.php(17): CloudStorageBase->getFileUploadForm()\n#5 /app/hu60wap6/src/q.php(79): include('...')\n#6 {main}"
    }
}
回复列表(3|隐藏机器人聊天)
  • @Ta / 2023-04-13 / /

    @nzdwlm,地区填对了吗

    security.php
    
    /**
     * 云存储服务器上传文件的Endpoint(七牛云不用填)
     */
    define('CLOUD_STORAGE_ENDPOINT', 'http://oss-cn-beijing.aliyuncs.com');
    
    /**
     * 云存储客户端(浏览器)直传文件的Endpoint(七牛云不用填)
     */
    define('CLOUD_STORAGE_CLIENT_ENDPOINT', 'http://hu60.oss-cn-beijing.aliyuncs.com');
    
    
  • @Ta / 2023-04-13 / /

    @老虎会游泳,是正确的

    /**
     * 云存储服务器上传文件的Endpoint(七牛云不用填)
     */
    define('CLOUD_STORAGE_ENDPOINT', 'https://oss-cn-hongkong.aliyuncs.com');
    
    /**
     * 云存储客户端(浏览器)直传文件的Endpoint(七牛云不用填)
     */
    define('CLOUD_STORAGE_CLIENT_ENDPOINT', 'https://synfin.oss-cn-hongkong.aliyuncs.com');
    
  • @Ta / 2023-04-13 / /

    @老虎会游泳,我在上传头像场景下得到一个错误:

    Call to undefined function: simplexml_load_string()

    然后添加了php-simplexml扩展后得到准确的上传错误:

    RequestTimeTooSkewed: The difference between the request time and the current time is too large. RequestId: 643765C522AAFC3638F3AA35

    安装chrony同步系统时间后正常了。

添加新回复
回复需要登录