path = require 'path' React = require 'react' {Actions} = require 'inbox-exports' # Passed in as props from MessageItem and FileDownloadStore # Generated in tasks/download-file.coffee # This is empty if the attachment isn't downloading. # @props.downloadData: # state - One of "pending "started" "progress" "completed" "aborted" "failed" # fileId - The id of the file # shellAction - Action used to open the file after downloading # downloadPath - The full path of the download location # total - From request-progress: total number of bytes # percent - From request-progress # received - From request-progress: currently received bytes # # @props.file is a File object module.exports = MessageAttachment = React.createClass displayName: 'MessageAttachment' getInitialState: -> progressPercent: 0 render: ->