最近在用阿里的OSS存储,在做网页端上传下载时用的JS SDK,遇到问题记录下
1. then is not a function
JS sdk按照阿里的文档sample写的上传的部分代码,出现then的错误(如下图1),后在网上查找到解决办法:
1 | //调用OSS.Wrapper构造函数 |
Live fearlessly
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true