登录 立即注册

首页 > 绿虎论坛 > 建站 > 讨论/求助 (发帖)

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

作者: @Ta

时间: 2023-04-13发布,2023-04-13修改

点击: 3977

接口 /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|显示机器人聊天)』

1.

@rkonfj,地区填对了吗

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 09:34//)

2.

@老虎会游泳,是正确的

/**
 * 云存储服务器上传文件的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 09:36//)

3.

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

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同步系统时间后正常了。

(/@Ta/2023-04-13 10:17//)

回复需要登录

5月11日 03:02 星期六

本站由hu60wap6华为CPU驱动

备案号: 京ICP备18041936号-1