Sha256: aafb19c998175fd24b08d665d27b6f12326d2dfde421b32b7cb7bcd65b4a8511

Contents?: true

Size: 329 Bytes

Versions: 4

Compression:

Stored size: 329 Bytes

Contents

class Trix.FileVerificationOperation extends Trix.Operation
  constructor: (@file) ->

  perform: (callback) ->
    reader = new FileReader

    reader.onerror = ->
      callback(false)

    reader.onload = =>
      reader.onerror = null
      try reader.abort()
      callback(true, @file)

    reader.readAsArrayBuffer(@file)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vapid-0.1.3 lib/vapid/vendor/trix/src/trix/operations/file_verification_operation.coffee
vapid-0.1.2 lib/vapid/vendor/trix/src/trix/operations/file_verification_operation.coffee
vapid-0.1.1 lib/vapid/vendor/trix/src/trix/operations/file_verification_operation.coffee
vapid-0.1.0 lib/vapid/vendor/trix/src/trix/operations/file_verification_operation.coffee