Skip to content

Implement folder upload - #48

Open
banksemi wants to merge 3 commits into
wKoza:masterfrom
banksemi:folder_upload
Open

Implement folder upload#48
banksemi wants to merge 3 commits into
wKoza:masterfrom
banksemi:folder_upload

Conversation

@banksemi

Copy link
Copy Markdown

Folder uploading was only applied to NgxDragAndDropDirective.

It does not work in IE because of limitations of web browsers.

Users need to setting DroptargetOptions.folderAccept

export const ngxDropTargetOptions: DropTargetOptions = {
    color: 'dropZoneColor',
    colorDrag: 'dropZoneColorDrag',
    colorDrop: 'dropZoneColorDrop',
    multiple: true,
    folderAccept: true
};
  1. If you want to get path of file, use item.filePath
var item : FileItem = ...
console.log(item.filePath);

banksemi added 2 commits July 16, 2019 11:19
We can upload folders from the drop zone.

1. In DropTargetOptions, set folderAccept to true.
2. When uploading the file, the path of file is FileItem.filePath
@wKoza

wKoza commented Jul 29, 2019

Copy link
Copy Markdown
Owner

I have reviewed this PR but it's not TypeScript friendly. I keep in mind the idea and work out on it in the coming weeks

<ng-template ngxInputFile [folder]=true>Folder Upload</ng-template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants