title: change upload folder and putting the location of the image in the api - sails.js
body: <p>I have a client-side application register form that send data to my sails.js based server.
  other then the basic data that's being send, i also have an image upload that uploads the image to ./tmp/uploads</p>
  
  <p>here is my server side code(in the controller):</p>
  
  <pre><code>upload: function  (req, res) {
     req.file('avatar').upload({ dirName: 'uploads' }, function (err, uploadedFiles){
        if (err) return res.send(500, err);
        res.view({
          items: uploadedFiles
        });
     });
  }
  </code></pre>
  
  <p>1) how do i change the folder that the files goes to? i obiously dont want the files be saved in .tmp folder</p>
  
  <p>2)how do i insert the image location to the data api that has just being created? and speaking of image location, how do i access the image file? i usualy expected something like this localhost:1337/.tmp/uploads/file.jpg would work.</p>