       xhr.send file
 
   _linkSubjectSet: (subjectSet, subjects) ->
-    debugger
     @setState log: @state.log.concat ["Linking #{subjects.length} subjects to subject set"]
     subjectSet.update links: Object.create subjectSet.links # HACK
     subjectSet.links.subjects ?= []


      subjectData =
        locations: (type for {type} in files)

        # FIXME: Metadata should be free-form.
        # metadata: metadata

        links: sharedSubjectLinks

      subject = apiClient.createType('subjects').createResource subjectData

        @setState log: @state.log.concat [new Error 'Failed to save workflow!']

  _saveSubjects: (project) ->
    subjectsToSave = (subject for subject in @_getSubjects() when null not in subject.files)

    sharedSubjectLinks =
      project: project.id
