     if name.match(regex) != null && className !=  file+"-hidden-input"
       $(obj).remove()
 
-
-
 # ***** PHOTOS *****
 @bindPhotoUploads = ->
   $('.survey-photo-upload').on 'click', (e, data) ->

    else
      docIdx = docCount + 1

    console.log docIdx + " document"

    $(e.target).siblings('.progress').find('.document-progress-bar').removeAttr("style")
    $(e.target).siblings('.progress').addClass('hidden')


    addTexareaForUpload("document", data, docIdx, $documentPreviewContainer)
    if data.result.format != "pdf" && data.result.format != "png" && data.result.format != "jpg"
      $('.document-preview img:last').attr('src', '/assets/file-icon.png')

  # validating upload format. If fomat to supported then handle error
    if data.result.format != undefined
