title: Upload and access to images on server with nginx and meteor
body: <p>I have a Meteor application deployed with nginx.
  I try to upload images from the application to save the images on the server. When I'm in localhost, I save my images in the <code>myapp/public/uploads</code> folder. But, when I deploy, this folder become <code>myapp/bundle/programs/web.browser/app/uploads</code>. So, when I upload an image, it saved in a new folder in myapp/public/uploads. But so, I can't access to it. When I'm in localhost I access to my images like that : <code>localhost:3000/uploads/myImage.png</code> but when I do <code>myAdress/uploads/myImage.png</code> I access to the <code>myapp/bundle/programs/web.browser/app/uploads</code> folder and not the one where the images are saved (<code>myapp/public/uploads</code>).</p>
  
  <p>This is my code to save images :</p>
  
  <pre><code>Meteor.startup(function () {
    UploadServer.init({
      tmpDir: process.env.PWD + '/app/uploads',
      uploadDir: process.env.PWD + '/app/uploads',
      checkCreateDirectories: true,
      uploadUrl: '/upload',
      // *** For renaming files on server
      getFileName: function(file, formData) {
        //CurrentUserId is a variable passed from publications.js
        var name = file.name;
        name = name.replace(/\s/g, '');
        return currentTileId + "_"  + name;
      },
      finished: function(fileInfo, formFields) {
        var name = fileInfo.name;
        name = name.replace(/\s/g, '');
        insertionImages(name, currentTileId, docId);
      },
    });
  });
  </code></pre>
  
  <p>So, do you know how can I do to save and access to my images when the application is deployed ? Maybe save the image in the <code>myapp/bundle/programs/web.browser/app/uploads</code> folder or access to the <code>myapp/public/uploads</code> folder with an url.</p>