[
{
"id": "6b471d641a30d424",
"type": "http in",
"z": "9ff0cccf6bf87a80",
"name": "",
"url": "/upload",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 190,
"y": 440,
"wires": [
[
"9cd5a4a6661d21bc"
]
]
},
{
"id": "9cd5a4a6661d21bc",
"type": "template",
"z": "9ff0cccf6bf87a80",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<!DOCTYPE html>\n<html lang="zh-CN">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>信息系统</title>\n <style>\n body {\n font-family: 'Microsoft YaHei', Arial, sans-serif;\n background-color: #f5f5f5;\n margin: 0;\n padding: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n }\n \n .form-container {\n background-color: white;\n padding: 30px;\n border-radius: 8px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n width: 100%;\n max-width: 500px;\n }\n \n .header {\n text-align: center;\n margin-bottom: 25px;\n border-bottom: 2px solid #4a90e2;\n padding-bottom: 15px;\n }\n \n .company-name {\n font-size: 28px;\n font-weight: bold;\n color: #333;\n margin-bottom: 5px;\n }\n \n .company-name-en {\n font-size: 14px;\n color: #555;\n margin-bottom: 10px;\n font-style: italic;\n }\n \n .system-title {\n font-size: 18px;\n font-weight: bold;\n color: #4a90e2;\n margin-top: 10px;\n }\n \n .form-group {\n margin-bottom: 20px;\n }\n \n label {\n display: block;\n margin-bottom: 8px;\n font-weight: bold;\n color: #555;\n }\n \n input[type="text"], \n input[type="file"] {\n width: 100%;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 16px;\n box-sizing: border-box;\n }\n \n input[type="text"]:focus,\n input[type="file"]:focus {\n border-color: #4a90e2;\n outline: none;\n box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);\n }\n \n textarea {\n width: 100%;\n height: 120px;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 16px;\n resize: vertical;\n box-sizing: border-box;\n font-family: inherit;\n }\n \n textarea:focus {\n border-color: #4a90e2;\n outline: none;\n box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);\n }\n \n .radio-group {\n display: flex;\n gap: 20px;\n margin-bottom: 15px;\n }\n \n .radio-option {\n display: flex;\n align-items: center;\n }\n \n .radio-option input {\n margin-right: 8px;\n }\n \n .file-upload-hint {\n font-size: 14px;\n color: #777;\n margin-top: 5px;\n }\n \n .submit-btn {\n background-color: #4a90e2;\n color: white;\n border: none;\n padding: 12px 20px;\n font-size: 16px;\n border-radius: 4px;\n cursor: pointer;\n width: 100%;\n transition: background-color 0.3s;\n }\n \n .submit-btn:hover {\n background-color: #3a7bc8;\n }\n\t\t.red-text {\n color: red;\n }\n </style>\n</head>\n<body>\n <div class="form-container">\n <div class="header">\n <div class="company-name">有限公司</div>\n <div class="company-name-en">ALUMINUM Co., Ltd.</div>\n <div class="system-title">信息系统</div>\n </div>\n <!-- 示例表单(参考) -->\n<form action="http://192.168.10.9:1880/upload" method="post" enctype="multipart/form-data">\n <input type="file" name="image">\n <button type="submit">上传</button>\n</form>\n </div>\n</body>\n</html>",
"output": "str",
"x": 370,
"y": 440,
"wires": [
[
"4150555863819396"
]
]
},
{
"id": "4150555863819396",
"type": "http response",
"z": "9ff0cccf6bf87a80",
"name": "",
"statusCode": "",
"headers": {},
"x": 570,
"y": 440,
"wires": []
},
{
"id": "60543975260ce890",
"type": "debug",
"z": "9ff0cccf6bf87a80",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 920,
"y": 540,
"wires": []
},
{
"id": "a1b2c3d4.5678e9",
"type": "http in",
"z": "9ff0cccf6bf87a80",
"name": "文件上传",
"url": "/upload",
"method": "post",
"upload": true,
"swaggerDoc": "",
"x": 240,
"y": 580,
"wires": [
[
"3aaa9d5791aadc07"
]
]
},
{
"id": "2cb0024379c56c90",
"type": "http response",
"z": "9ff0cccf6bf87a80",
"name": "",
"statusCode": "",
"headers": {},
"x": 930,
"y": 600,
"wires": []
},
{
"id": "939ff9ca62e5a0bd",
"type": "function",
"z": "9ff0cccf6bf87a80",
"name": "function 3",
"func": "msg.payload = {\n status: 'success',\n message: '文件已保存',\n file: msg.payload.originalname\n};\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 580,
"wires": [
[
"2cb0024379c56c90",
"60543975260ce890"
]
]
},
{
"id": "3aaa9d5791aadc07",
"type": "file",
"z": "9ff0cccf6bf87a80",
"name": "",
"filename": "D:\\nodered\\upload\\{{originalname}}",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 520,
"y": 580,
"wires": [
[
"939ff9ca62e5a0bd"
]
]
}
]