title: Modify image obtained from loopback-component-storage
body: <p>I am using <code>loopback</code> for storing Image to the <code>server</code>.</p>
  
  <p>I want to <strong>modify</strong> the <strong>file name</strong> of the file before getting saved to the server. </p>
  
  <p>Also I want to convert it to another thumbnail form before getting saved.</p>
  
  <p>Here is how I am doing.</p>
  
  <blockquote>
    <p>At client side</p>
  </blockquote>
  
  <pre><code>Upload.upload(
  {
      url: '/api/containers/container_name/upload',
      file: file,
      fileName: "demoImage.jpg",
      //Additional data with file
      params:{
       orderId: 1, 
       customerId: 1
      }
  });
  </code></pre>
  
  <blockquote>
    <p>At Server Side I am receiving the query "params" but not getting the "File Name"</p>
  </blockquote>
  
  <p>My Storage model name is <code>container</code></p>
  
  <pre><code>Container.beforeRemote('upload', function(ctx,  modelInstance, next) {
  
      //OUPTUTS: {orderId:1, customerId:1]}
      console.log(ctx.req.query);
  
      //Now I want to change the File Name of the file.
      //But not getting how to do that
  
      next();
  })
  </code></pre>
  
  <p><strong>How to change the File name of the File getting saved at the server?</strong></p>