<div class="deformFileupload"
     i18n:domain="substanced"
     tal:define="oid oid|field.oid;
                 css_class css_class|field.widget.css_class;
                 style style|field.widget.style">

  ${field.start_mapping()}

  <div>

    <img tal:condition="cstruct.get('preview_url')" src="#" 
         tal:attributes="src cstruct['preview_url']"
         alt="Preview url"
         style="width: 50px; height: 50px;"/>

  </div>

  <div class="deformReplaces" tal:condition="cstruct.get('uid')">

    <input type="hidden" name="uid" value="${cstruct['uid']}"
           id="${oid}-uid"/>
    <span tal:content="cstruct.get('filename')"
          id="${oid}-filename"/>

  </div>

  <input type="file" name="upload" 
         tal:attributes="class css_class;
                         style style;"
         id="${oid}"/>

  ${field.end_mapping()}

</div>
