 
   openUrlFile: (url) ->
     @urlProvider.openFileFromUrl url, (err, content, metadata) =>
+      @_event 'willOpenFile', {op: "openUrlFile"}
       return @alert(err, => @ready()) if err
       @_fileOpened content, metadata, {openedContent: content.clone()}, @_getHashParams metadata
 

    reader.readAsText file

  openLocalFile: (file, callback=null) ->
    @readLocalFile file, (data) =>
      content = cloudContentFactory.createEnvelopedCloudContent data.content
      metadata = new CloudMetadata

      callback "Unable to temporarily save copied file"

  openCopiedFile: (copyParams) ->
    @_event 'willOpenFile', {op: "openCopiedFile"}
    try
      key = "cfm-copy::#{copyParams}"
      copied = JSON.parse window.localStorage.getItem key
