我正在从事一个涉及大量JS和CSS的顶点项目,因此我正在计算机上的VSCode上进行开发。问题是每次我要更改文件时,都必须转到静态文件页面并分别上传每个文件。 我可以打电话给我,以便我可以自动执行请求吗?
基于提交表单(用于上传文件),我构建了以下代码(掩盖了IP和端口):
var request = require("request");
var fs = require("fs");
upload("js", "./build/exports.min.js");
function upload(directory, filePath) {
var req = request.post("http://0.0.0.0:800/apex/wwv_flow.accept", function (err, resp, body) {
if (err) {
console.log('Error!');
} else {
console.log('URL: ' + body);
}
});
var form = req.form();
form.append("P271_DIRECTORY", directory);
form.append("P271_UPLOAD_FILE_NAME", fs.createReadStream(filePath));
form.append("P271_FILE_CHARSET", "utf-8");
form.append("P271_UNZIP_FILE", "Y");
form.append("P0_FLOWPAGE", "101;1|9");
}
但是我收到下面显示的错误
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not found</TITLE>
</HEAD><BODY><H1>Not found</H1>
The requested URL /apex/wwv_flow.accept was not found on this server</BODY></HTML>