wKoza / ngx-upload

Ngx-upload is an upload module for Angular Ivy ready
30 stars 15 forks source link

Implement folder upload #48

Open banksemi opened 5 years ago

banksemi commented 5 years ago

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);
    
wKoza commented 5 years ago

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