[英]How can i bring in front of (everything),a button in an html page?
[英]How can I bring a HTML Image to the backend?
我有一個中間件:
export async function imageTagging(image){
console.log(image)
const response = await axios.get('/api/tensorflow', {
image: image
});
return response.data[0];
}
這記錄了我(圖片):
<img data-v-713aaf8f="" id="MLIMAGE" src="/img/Erdmännchen.b5f674c2.jpg" width="50%" crossorigin="anonymous" class="card-img-top embed-responsive-item" style="border-style: solid;">
我在后端的 API-Call 看起來像:
app.get('/api/tensorflow', userMiddleware.isLoggedIn, (req, res) => {
console.log(req.query);
console.log(res.query);
})
它記錄了我:
{}
undefined
首先,您正在執行 GET 請求。 您不能將數據發布到 /GET 端點。 你需要一個 /POST。
其次, req.query
是查詢參數的鍵值對的 object ,在您的情況下,它是空的。 所以我不明白,你的確切問題是什么?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.