文件上传案例

admin2021-01-27  193

import console; 
import web.multipartFormData;
import inet.http;
 
var fileData = web.multipartFormData();
fileData.addFile("file","C:\Documents and Settings\Administrator\桌面\aardio.png");
var header = "Content-Type:" ++ fileData.contentType();
 
var http = inet.http()
console.log( http.post("http://127.0.0.1:8041/upload.aardio",fileData.readAll(),header) )
http.close()
 
console.pause(true);
转载请注明原文地址: https://www.aardio.net/read-145.html
最新回复(0)