Fix:Drag n drop folder upload

This commit is contained in:
advplyr 2022-04-27 18:03:00 -05:00
parent c344555be3
commit ac58536501
2 changed files with 4 additions and 3 deletions

View File

@ -174,8 +174,8 @@ export default {
if (mediaType === 'podcast') return this.cleanPodcast(item, index)
return this.cleanBook(item, index)
},
async getItemsFromDataTransferItems(items, mediaType) {
var files = await this.getFilesDropped(items)
async getItemsFromDataTransferItems(dataTransferItems, mediaType) {
var files = await this.getFilesDropped(dataTransferItems)
if (!files || !files.length) return { error: 'No files found ' }
var itemData = this.fileTreeToItems(files, mediaType)
if (!itemData.items.length && !itemData.ignoredFiles.length) {

View File

@ -195,7 +195,8 @@ export default {
e.preventDefault()
this.isDragging = false
var items = e.dataTransfer.items || []
var itemResults = await this.uploadHelpers.getItemsFromDrop(items)
var itemResults = await this.uploadHelpers.getItemsFromDrop(items, this.selectedLibraryMediaType)
this.setResults(itemResults)
},
inputChanged(e) {