       { method: 'get', path: '/:_id', lookup: (params, query) -> return { _id: params._id }},
       { method: 'put', path: '/put/:_id', lookup: (params, query) -> return { _id: params._id }}
    ]}
-   # Define a GET API that uses the md5 sum id files
 )
 
 myJobs = JobCollection 'queue', { idGeneration: 'MONGO' }

      uploadProgress: () ->
         percent = Session.get "#{this._id}"

      isImage: () ->
         imageTypes[this.contentType]?

      altMessage: () ->
         if this.length isnt 0
            "Processing thumbnail of #{shorten this.filename, 20}..."
         else
            "Uploading #{shorten this.filename, 20}..."

   fileTableEvents =
      # Wire up the event to remove a file by clicking the `X`
      'click .del-file': (e, t) ->
         t.data.remove this._id

   Template.gallery.helpers fileTableHelpers

   Template.gallery.helpers
      dataEntries: () ->

      thumb: () ->
         "#{this.metadata.thumb}"

      isImage: isImage

      shortFilename: shortFilename

   Template.gallery.rendered = () ->
      # This assigns a file drop zone to the "file table"
      this.data.resumable.assignDrop $(".#{myData.root}DropZone")

   Template.fileControls.events
      'click .remove-files': (e, t) ->
         console.log "Removing all files"
         this.find({}).forEach ((d) -> this.remove(d._id)), this

   jobTableEvents =
      'click .cancel-job': (e, t) ->
