检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
配置SDK代理(Node.js SDK) 开发过程中,您有任何问题可以在github上提交issue,或者在华为云对象存储服务论坛中发帖求助。 在项目工程根目录下使用npm命令下载proxy-agent依赖包。 npm install --save proxy-agent 在项目工程里面声明并配置代理。
网站文件托管(C SDK) 开发过程中,您有任何问题可以在github上提交issue,或者在华为云对象存储服务论坛中发帖求助。 您可通过以下步骤实现网站文件托管: 将网站文件上传至OBS的桶中,并设置对象MIME类型。 设置对象访问权限为公共读。 通过浏览器访问对象。 代码示例:网站文件托管
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
获取时需要重写Content-Type为text/plain,那么CanonicalizedResource为: /bucket-test/object-test?response-content-type=text/plain&versionId=xxx 桶名: 如果桶未绑定自定义域名,则直接使用原始桶名。
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
ssage () ); } } ); $promise->wait (); 异步调用会立即返回异步调用结果对象(GuzzleHttp\Promise\Promise),需要调用该对象的wait方法以等待异步调用完成。 父主题: 初始化
参数类型 是否必选 描述 request BucketMetadataInfoRequest 必选 参数解释: 获取桶元数据请求参数,详BucketMetadataInfoRequest。 表2 BucketMetadataInfoRequest 参数名称 参数类型 是否必选 描述 bucketName
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
需要通过多段上传实现。 关于PUT和POST上传更详细的API信息,请参见API参考PUT上传和POST上传。 父主题: API和SDK等开发者相关
重写响应头(Node.js SDK) 开发过程中,您有任何问题可以在github上提交issue,或者在华为云对象存储服务论坛中发帖求助。 下载对象时,可以重写部分HTTP/HTTPS响应头信息。可重写的响应头信息见下表: 参数 作用 ResponseContentType 重写
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
上传对象(Node.js SDK) 开发过程中,您有任何问题可以在github上提交issue,或者在华为云对象存储服务论坛中发帖求助。 本示例用于上传字符串“Hello OBS”到桶名为“examplebucket”里,名称为“example/objectname”。 代码示例如下所示:
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
Language、Expires、Cache-Control、Content-Disposition、Content-Encoding。 开发过程中,您有任何问题可以在github上提交issue,或者在华为云对象存储服务论坛中发帖求助。 接口约束 您必须是桶拥有者或拥有下载对象
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)
error->further_details) { printf("Error further_details: \n %s\n", error->further_details); } if (error && error->extra_details_count)