ฉันกำลังพยายามอัปโหลดรูปภาพผ่านคำขอ POST ด้วยคำขอ (https://github.com/request/request) หรือ restler(https://github.com/danwrong/restler)
ถ้าฉันต้องการทำเหมือนแบบฟอร์มนี้เพื่ออัปโหลดรูปภาพไปยัง upload.php จะตั้งค่าแอตทริบิวต์ชื่ออินพุต (ค่า) (ชื่อ = "ไฟล์") ได้อย่างไร?
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file" > <!-- <<<this -->
<input id="submit" name="submit" type="submit" value="upfile">
</form>