<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>BFW NEW PAGE</title>
<script id="bfwone" type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
<script type="text/javascript">
bready(function() {
use(["aliyun-oss-sdk.min"], function() {
const client = new OSS({
region: 'oss-cn-beijing',
accessKeyId: 'LTAI4FxV5ZvuoQ1mF5XhhuG5',
accessKeySecret: 'IYw8mnQgLj6Q7GRhhB9tzqiLz3VRqi',
bucket: 'bfwtest',
});
client.list().then((result) => {
console.log('objects: %j', result.objects);
return client.put('my-obj', new OSS.Buffer('hello world'));
}).then((result) => {
console.log('put result: %j', result);
return client.get('my-obj');
}).then((result) => {
console.log('get result: %j', result.content.toString());
});
});
});
</script>
<style>
</style>
</head>
<body>
查看console控制台
</body>
</html>
网友回复