How to send in media[] parameters for update with media API call?


I am using twit( status(without media) works fine.But update with media( is not working. This is my code:(used with express)

//client side

<form id="tweeter" action='/image' method='POST' >
  <input type="text" name="tw" id="tw" />
  <input type='file' name='img' id='img' /> 
  <input type="submit" value="submit" /> 

 //server side'/image',function(req,res){
 var f="./"+req.body.img;
 console.log(req.body.img);'statuses/update_with_media', {status:,
  "media[]":[f]}, function(err, reply) {

The error I get is ‘Missing or invalid url parameter’. How should I send the image file via media[]?Thank you in advance!


I’m wondering the same thing!