title: Sails.js how can i get the name of image after upload
body: <p>I want to get the name of image and insert it in MySQL after uploaded it. 
  Turn out I get the store images path instead. like <strong>E:\work\assets\pic_items\98046f37-ac7a-42cc-996.png</strong> on MySQL
  i only want name of image after uploaded it.</p>
  
  <p>How can i do that?</p>
  
  <p>This is my controller</p>
  
  <pre><code>update: function (req, res){
      var id = req.param('id');
      var category_id = req.param('category_id'); 
      var title = req.param('title');
      var description = req.param('description');
      var width = req.param('width');
      var height = req.param('height');
      var price = req.param('price');
      var picture_path = req.param('picture_path');
  
  
      console.log(id);
  
      req.file('picture_path').upload({dirname: "../../assets/pic_items"},function (err, uploadedFiles){
          if (err) {
              return res.send(err);
          }   
          console.log(uploadedFiles);
          if (uploadedFiles.length === 0){
              console.log(uploadedFiles);
              return res.serverError('no file was uploaded'); 
  
          }
          picture_path = uploadedFiles[0].filename;
              picture_path = uploadedFiles[0].fd.replace(/^.[\\\/]/, '');
  
  
      Item.update({id:id},{category_id:parseInt(category_id),title:title, description:description, width:width, height:height, price:parseInt(price), picture_path:picture_path}).exec(function(err){
          if(err){
              console.log(err);
              return res.send('life is suck');
          }
              res.redirect('/item');
          });
      });
  },
  </code></pre>