title: Grails losing image if not select new one on edit page
body: <p>I'm making a website using spring security and grails 3.1.10. In this site I'm listing all image from database and show them at index. The problem is when I tried to edit one of those image. For example I want to just edit name but if I do not select an image this field become null.But I want to protect the image. How can i through this. </p>
  
  <p>edit gsp</p>
  
  <pre><code>&lt;div class="col-xs-2 col-sm-2 col-md-2"&gt;
   &lt;input type="file" class="form-control" name="productImage"  id="productImage"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried to write a controller to protect old one but this one not work.</p>
  
  <pre><code> def id=params.id
      Product old=Product.findById(params.id)
      def f = request.getFile('productImage')
      if(f.empty){
          print("file is empty")
          if(old.productImage){
              println("there is a file in database")
              product.productImage=old.productImage
          }}
  </code></pre>