 
 checkImageInternal = (id) ->
   image = imagesInternal[id].image
+  #console.log "#{id} corresponds to #{image}"
   checkImage image if image?
 
 messageDrag = (target, bodyToo = true, old) ->

    fields: file: true
  .observeChanges
    added: (id, fields) ->
      images[id].file = fields.file
      initImageInternal images[id].file, id if images[id].file?
    changed: (id, fields) ->
      if fields.file? and images[id].file != fields.file
        if fileType(fields.file) in ['image', 'video']
          forceImgReload urlToFile id
        imagesInternal[images[id].file].image = null if images[id].file?
        images[id].file = fields.file
        initImageInternal images[id].file, id if images[id].file?
, 50

initImage = (id) ->
  if id not of images

    updateFileQuery()

initImageInternal = (id, image = null) ->
  #console.log "initImageInternal #{id}, #{image}"
  if id not of imagesInternal
    imagesInternal[id] =
      count: 0
