feross/drag-drop

drag-drop/buffer drop "fullPath" property

azu opened this issue · 3 comments

azu commented

drag-drop's result have file.fullPath.

var dragDrop = require('drag-drop')
dragDrop('#dropTarget', function (files) {
  files.forEach(function (file) {
    console.log(file.fullPath)
  })
})

But, drag-drop/buffer's result not have fullPath

var dragDrop = require('drag-drop/buffer')
dragDrop('#dropTarget', function (files) {
  files.forEach(function (file) {
    console.log(file.fullPath) // undefined
  })
}
  • drag-drop/buffer.js

    Lines 13 to 16 in 250dd93

    buffer.name = file.name
    buffer.size = file.size
    buffer.type = file.type
    buffer.lastModifiedDate = file.lastModifiedDate

Is this expected design?

This was an oversight. Thanks for reporting. Fixed in 2.13.2.

azu commented

Thanks!