我正在尝试将subscription.html添加到index.html。 我到处研究并使用了所有形式,但是没有用。在我的subscribe.html中不显示任何内容。 如果你们能让我知道如何处理这个问题,我将感到高兴。 这是index.html中的代码。
// Date � � � Owner � � � � � � �Short description
这是subscribe.html中的代码
.*
答案 0 :(得分:1)
在data="html/subscribe.html">
部分中,是相对于索引页面的“预订”在目录“ html”中吗?尝试data="./subscribe.html"
答案 1 :(得分:0)
您还可以使用JavaScript const util = require('util')
const gc = require('../config/')
const bucket = gc.bucket('jsimage')//bucket name di google drive
const path = require('path')
const { format } = util
//promise dibuat langsung di jalankan, karena itu tidak perlu then untuk resolve dan catch untuk error
const uploadImage = (file) => new Promise((resolve, reject) => {
//console.log(file);
const {filename} = file;
const picture = path.join(__dirname,'../uploads/',filename);
//ini peruntah untuk uplaod
bucket.upload(picture);
//ini yang di kirim ke return
const publicUrl = format(
`https://storage.googleapis.com/${bucket.name}/${filename}`
)
resolve(publicUrl)
reject(err=>(err))
})
module.exports = uploadImage
技术来解决此问题。这是一种非常优雅的新技术
请继续阅读->
https://developers.google.com/web/updates/2015/03/introduction-to-fetch